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

I did some benchmarks, and it seems you are right that there's no (more) cache-friendly solution in general (at least, not that I could come up with). Memoizing the full entries (key and value) into a slice and then sorting that slice by key has basically the same cache-thrashing characteristics as randomly accessing the values, and is no faster (sometimes slower).


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

Search: