3 ms·
This loop doesn’t test them all - it tests every 1/127th integer, so it only runs about 16 million times.
by nneonneo 5y ago
This loop doesn’t test them all - it tests every 1/127th integer, so it only runs about 16 million times.
- Cthulhu_ 5y agoAnd a modern CPU runs billions of instructions per second, so it shouldn't take too long at all. Depends on the implementation of the function as well though, and how the compiler can optimize, unroll or optimize both the function under test and the test itself.
- deleted 5y ago[deleted]