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

Have you tried to benchmark things on a laptop recently? Without the intricate and largely undocumented dance with perf_event_open and rdpmc to actually get access to the raw cycle counter, the results you’ll get will, in fact, be “it depends” (easily 20% in either direction; 50% if you’re not keeping track of whether you’ve turned on the AC or opened the window). On Windows, the dance is even more tedious, as you’re going to have to account for and subtract every context switch by hand. And on truly awful CPUs like Intel’s first attempts at AVX-512, even the cycle count is not enough to fully give you an idea of “performance”.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: