The posix API for querying high-precision hardware clocks is clock_gettime
. If one second precision is fine then time(nullptr)
is your friend. Unfortunately, using precice clocks takes its price - they are more expensive CPU-wise.
Tags | About |
The posix API for querying high-precision hardware clocks is clock_gettime
. If one second precision is fine then time(nullptr)
is your friend. Unfortunately, using precice clocks takes its price - they are more expensive CPU-wise.
Suppose you have a multi-threaded server that serves tens of thousands read queries per second. Those queries use a shared data-structure or index that is mostly immutable during the server run with the exception of periodic index reloads. How do you implement data reloads in that server while keeping it live and kicking in production?
Here is the analysis of a recent bug I’ve stumbled upon. My initial reaction was that
the problem is in the compiler (or that “These are wrong bees”). Consider the code below. We copy 64 integers into a properly allocated destination buffer and yet, if compiled with -O3
switch this code crashes with segfault!
Hi it’s my first attemp at blogging. I’ve chosen Hugo with Icarus theme for the content generation. This blog is going to be published vi my github repository. Stay tuned!