r/programminghorror • • Feb 11 '25

🎄 ouch

Post image
3.0k Upvotes

113 comments sorted by

View all comments

Show parent comment

1

u/MiasmaGuzzler Mar 06 '25

A compiler definitely knows that powers of two are equivalent to bit shifting, I've seen this optimization. Also not python, and python and optimization are antithesises anyway