r/programming • u/DataBaeBee • Sep 14 '26
How GCC Eliminates Unnecessary Integer Division
https://leetarxiv.substack.com/p/how-gcc-eliminates-unnecessary-integer
250
Upvotes
r/programming • u/DataBaeBee • Sep 14 '26
View all comments
Show parent comment
-7
u/QuestionableEthics42 Sep 14 '26
80 is on the bad end. Apparently it's 20-80 cycles, from some quick googling on my phone. And they put the cycles for imul on the good end, so not a fair comparison. (Though it's still a huge difference, just not quite as exaggerated as they made it sound)