News for hackers. Stuff that matters.
Re:Why is division so much more complex than other arithmeti... by IshKebab on Friday August 11, 2023 @03:48PM (#37093133)
He is talking about the fact that compilers can turn division by a constant into multiplications and bit shifts which are much faster.

Here's an example: https://godbolt.org/z/8vG637fb5

It compiles x/6 to some mad multiplication, bitshift and add.

There are no comments on this comment yet.