Hacker News new | past | comments | ask | show | jobs | submit login

The Linux version was benchmarked with gettimeofday() while the Windows one with QueryPerformanceCounter. The first has a lower resolution of 10 micros and as such the benchmark is not comparable.



gettimeofday() is totally inappropriate for benchmarking. Any time the system clock is being adjusted by NTP, for instance, your benchmark timing will be skewed.

They should be using the following API if they're going to use the system time to measure time differences:

clock_gettime(CLOCK_MONOTONIC, &timespec);

It's a really good clue that a timing function is inappropriate for benchmarking when the man page talks about time zones.


While that may be true, the kind of errors you'd expect that to cause do not appear present in their results. It doesn't matter, here.


gettimeofday has nanosecond precision and has whatever resolution the underlying clock has. On most recent machines, the clock is the TSC and you really do get nanoseconds out.




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

Search: