It’s better to not compost bread.
While it will rot down quite quickly, it might attract rats or other vermin to your compost heap in the meantime.
Little bits can be added to wormeries but don’t add a lot in one go as it can be too salty for the worms.
Use up older bread rather than throwing it away – going stale bread can be turned into breadcrumbs, croutons or used for puddings.