Confessions of a Code Addict
https://blog.codingconfessions.com/ (RSS)
Watch now (22 mins) | Is the TLB really flushed during context switches?
I hope you enjoyed the recent article on how Unix spell was designed to lookup a 250kB dictionary on a 64kB machine. Writing it wore me down.
How do you fit a dictionary in 64kb RAM? Unix engineers solved it with clever data structures and compression tricks. Here's the fascinating story behind it.
How does the Linux kernel represent processes and their state: A breakdown of task_struct and mm_struct
Looking back at what we accomplished in 2024, and plans for 2025
Yesterday we concluded the live session on live coding a bytecode compiler and interpreter (VM) for a tiny subset of Python in Python. Even though I said I will not be sharing the recording, I think the session went quite smooth so I am sharing it here.
Understand how context switching affects CPU registers, caches, TLB, and pipeline performance, and learn strategies to mitigate performance penalties
We are due for our next live session.
How the kernels implement the fork system call
No, I'm not talking about import antigravity
Why the Pythonic way of doing emptiness check on sequences is not necessarily ambiguous in most cases
No clustering algorithm is perfect and you must make a trade-off.
What is speculative decoding, how it works and what are some of the recent advances in this area?
Learn how the knowledge of CPython internals translate into performance insights for your code
Last night we did this live session on performance engineering.
I started this Substack on 23rd April, 2023 from 0 subscribers with a dream of writing deeply technical articles and making a living.
A deep dive into CPython's bytecode instruction format and execution engine internals
Learn about runtime initialization, parsing and compilation of the Python code into bytecode leading to execution on the virtual machine
Over the past year as I’ve dived deep into systems programming, I’ve developed a strong appreciation for the finer details that drive performance optimization—something I truly enjoy discussing.
How costly it is to call functions and builtins in your python code? Does inlining help? How have the recent CPython releases improved performance in these areas?
Ever wondered how your CPU handles two tasks at once? Discover the magic of Simultaneous Multithreading and see what’s really going on inside.
Last weekend, we did a live session on the architecture of the hyper-threading (simultaneous multithreading) implementation in Intel’s x86 processors.
Dear subscribers, This is not my usual deep technical post, it’s going to be a rant about the problems I (and many other Indian writers) have faced in monetizing their writing on Substack, even after being here for years, bringing in thousands of new readers and producing hundreds and thousands of articles collectively.
Learn everything about hash tables, collision handling, and performance optimization
Learn about the microarchitecture implementation of SMT & its performance implications
A detailed code walkthrough of how CPython implements memory management, including reference counting and garbage collection
Thank you for reading Confessions of a Code Addict — your support allows me to keep doing this work.
Yesterday, we did the live session on the internals of remote sampling profilers.
Learn what profilers are, when to use them and quick demo of few profilers for Python