Low Latency
Branchless & Cache friendly programming
This post discusses how we can write code (mainly focused to C++ but can be applied in almost any language) in such a way that it follows branchless-ness and spacial locality
Strictly Align Memory Address
We can use bitwise operations and tricks to ensure that memory addresses are strictly aligned for performance and hardware safety.
Packing & Unpacking two integers in one
Packing and unpacking two integers into one is a bit manipulation technique used to compress multiple small values into a single larger variable to save memory or bandwidth.
Intrusive Data Type
There are many ways to make data generic in C and C++. There is one peculiar way that I like the most and is also used in Linux Kernel.
Type Punning
Type punning is a programming trick where you force the computer to read a chunk of memory as a completely different data type than what it was originally declared as.