Hacker News new | ask | show | jobs
by nynx 1627 days ago
Also, O(n) doesn’t mean much when the CPU can execute hundreds of checks in a few tens of cycles.
1 comments

Not for jumps - modern CPUs still (usually) have limit of one taken branch per cycle, or 1 to 2 untaken branches. And usually branch prediction will be the limiting factor anyway, for which a single branch is gonna be faster than many.