3 ms·
> When I've been micro-optimizing performance-critical code, integer division shows up as a hot spot regularly. Now I'm really curious. In my experience, integ
by rwallace 5y ago
> When I've been micro-optimizing performance-critical code, integer division shows up as a hot spot regularly.
Now I'm really curious. In my experience, integer division practically never happens (except by powers of 2 that are easily optimized down to a shift), to the point where I was frowning in puzzlement about why Apple spent resources optimizing it.
How is the code you are looking at, bottlenecking on integer division? What on earth is it doing, to make that a frequent operation?