Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For small arrays that can fit in L1 cache, it's ok to do more loops. For bigger arrays, cache miss could remove all the gains.


Regardless of the array's size, the expected win from early exit on random keys is a constant number of iterations.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: