3 ms·
You're computing 2^Y there. pow is usually a floating point operation, that's why it's slow. Modern CPU's may actually be fast at a pow floating point operatio
by exDM69 14y ago
You're computing 2^Y there.
pow is usually a floating point operation, that's why it's slow. Modern CPU's may actually be fast at a pow floating point operation, but it's still expensive to move integers from general purpose registers to floating point registers.