I always wondered how we could programmatically ensure variables get

Arpit Bhayani

Arpit Bhayani

Aug 27, 2024 • 1 min read


I always wondered how we could programmatically ensure variables get aligned on different CPU cache lines to minimize cache thrashing.

Did a quick prototype to understand the implementation specifics. Everything I studied in the Computer Architecture and Advanced Unix Programming course makes sense now :)

Got the dopamine kick I was craving for :)

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses