3 ms·
Note: There is no guarantee that a compiler won't optimize this to non-constant time. And even if it keeps it constant time, a processor may end up running a f
by TheLoneWolfling 12y ago
Note: There is no guarantee that a compiler won't optimize this to non-constant time.
And even if it keeps it constant time, a processor may end up running a function like this in non-constant time, due to caching and branch prediction effects.