Killing Cache-Line Contention with Sharded Counters
1731 words ~9 mins

#rust #concurrency #performance #atomics
A single hot AtomicU64 forces every writer to bounce the same cache line between cores. Sharding the counter across cache-line-padded atomics turns a contended fetch_add into uncontended local writes, at the cost of an O(SHARDS) read.

Convert hasNext style iterator to C++ Range
412 words ~2 mins

#c++ #ranges
Key-value stores provide a generic API to store and retrieve values using the key. In this post, we will see how relational tables can be mapped to key-value stores.

Copy Elision in C++
855 words ~5 mins

#c++
Key-value stores provide a generic API to store and retrieve values using the key. In this post, we will see how relational tables can be mapped to key-value stores.