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

Theo Schlossnagle and Riley Berton have recently implemented and discussed timing functions with the following performance characteristics (25-50ns):

  Operating System  Call          System Call Time  Mtev-variant Call	Speedup
  Linux 3.10.0      gettimeofday  35.7 ns/op        35.7 ns/op          x1.00
  Linux 3.10.0	    gethrtime     119.8 ns/op       40.4 ns/op          x2.96
  OmniOS r151014    gettimeofday  304.6 ns/op       47.6 ns/op          x6.40
  OmniOS r151014    gethrtime     297.0 ns/op       39.9 ns/op          x7.44
Here is the article: https://www.circonus.com/2016/09/time-but-faster/

They also use TSC and (CPU-bound) background threads to update shared memory.

The implementation is available as C library for Linux and Illumos/OmniOS: https://github.com/circonus-labs/libmtev/blob/master/src/uti...



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

Search: