5 ms·
I would love to have some benchmarks for this on some reasonably practical scenario. In many common cases shift and masking can replace integer division (i.e.
by juancn 1mo ago
I would love to have some benchmarks for this on some reasonably practical scenario.
In many common cases shift and masking can replace integer division (i.e. hash tables) and you avoid division altogether, and that probably has about the cost of converting an int to a float.