Confessions of a Code Addict

Demystifying complex programming concepts through deep technical explorations of language internals, computer architecture, and performance engineering – helping curious developers become better by understanding how things really work under the hood.
https://blog.codingconfessions.com/ (RSS)
visit blog
Linux Context Switches: The Truth About TLB Flushes
17 Jan 2025 | original ↗

Watch now (22 mins) | Is the TLB really flushed during context switches?

Live Session: How Modern CPUs Execute Your Code: A Deep Dive into Performance
14 Jan 2025 | original ↗

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 Unix Spell Ran in 64kB RAM
12 Jan 2025 | original ↗

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.

Linux Context Switching Internals: Part 1 - Process State and Memory
29 Dec 2024 | original ↗

How does the Linux kernel represent processes and their state: A breakdown of task_struct and mm_struct

Reflections on 2024 and Exciting Plans for 2025
18 Dec 2024 | original ↗

Looking back at what we accomplished in 2024, and plans for 2025

Recording: Live Coding a Bytecode Compiler for Python
15 Dec 2024 | original ↗

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.

Context Switching and Performance: What Every Developer Should Know
12 Dec 2024 | original ↗

Understand how context switching affects CPU registers, caches, TLB, and pipeline performance, and learn strategies to mitigate performance penalties

Live Session: Live Coding a Bytecode Interpreter for Python
1 Dec 2024 | original ↗

We are due for our next live session.

Disillusioning the Magic of the fork System Call
26 Nov 2024 | original ↗

How the kernels implement the fork system call

An Unreachable Hidden XKCD Easter Egg inside CPython
18 Nov 2024 | original ↗

No, I'm not talking about import antigravity

The Pythonic Emptiness
9 Nov 2024 | original ↗

Why the Pythonic way of doing emptiness check on sequences is not necessarily ambiguous in most cases

The CAP Theorem of Clustering: Why Every Algorithm Must Sacrifice Something
29 Oct 2024 | original ↗

No clustering algorithm is perfect and you must make a trade-off.

Speculative Decoding and Beyond: A Survey of Speculative Decoding Techniques
18 Oct 2024 | original ↗

What is speculative decoding, how it works and what are some of the recent advances in this area?

Connecting CPython's GC Internals to Real-World Performance
2 Oct 2024 | original ↗

Learn how the knowledge of CPython internals translate into performance insights for your code

Recording: Six Key Performance Engineering Lessons from 1BRC
23 Sept 2024 | original ↗

Last night we did this live session on performance engineering.

Celebrating 2^13 Subscribers & My Birthday
10 Sept 2024 | original ↗

I started this Substack on 23rd April, 2023 from 0 subscribers with a dream of writing deeply technical articles and making a living.

The Design & Implementation of the CPython Virtual Machine
31 Aug 2024 | original ↗

A deep dive into CPython's bytecode instruction format and execution engine internals

CPython Internals: What Happens Before Bytecode Execution Starts
30 Aug 2024 | original ↗

Learn about runtime initialization, parsing and compilation of the Python code into bytecode leading to execution on the virtual machine

(Live Session) Performance Thinking: Six Key Lessons from 1BRC
17 Aug 2024 | original ↗

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.

Are Function Calls Still Slow in Python? An Analysis of Recent Optimizations in CPython
8 Aug 2024 | original ↗

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?

Two Threads, One Core: How Simultaneous Multithreading Works Under the Hood
24 Jul 2024 | original ↗

Ever wondered how your CPU handles two tasks at once? Discover the magic of Simultaneous Multithreading and see what’s really going on inside.

Recording: How Hyper-Threading Works — A Microarchitectural Perspective
8 Jul 2024 | original ↗

Last weekend, we did a live session on the architecture of the hyper-threading (simultaneous multithreading) implementation in Intel’s x86 processors.

Substack has Failed Indian Creators
27 Jun 2024 | original ↗

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.

Looking Under the Hood of Python's Set Data Structure
25 Jun 2024 | original ↗

Learn everything about hash tables, collision handling, and performance optimization

Live Session: How Hyper-Threading (Simultaneous Multithreading) Works — A Microarchitectural Perspective
20 Jun 2024 | original ↗

Learn about the microarchitecture implementation of SMT & its performance implications

CPython Garbage Collection: The Internal Mechanics and Algorithms
11 Jun 2024 | original ↗

A detailed code walkthrough of how CPython implements memory management, including reference counting and garbage collection

Invite your friends to read Confessions of a Code Addict
6 Jun 2024 | original ↗

Thank you for reading Confessions of a Code Addict — your support allows me to keep doing this work.

Recording: CPython and ELF Essentials for Building a Basic Remote Profiler
3 Jun 2024 | original ↗

Yesterday, we did the live session on the internals of remote sampling profilers.

Everything You Wanted to Know About Profilers in Python
1 Jun 2024 | original ↗

Learn what profilers are, when to use them and quick demo of few profilers for Python

↑ These items are from RSS. Visit the blog itself at https://blog.codingconfessions.com/ to find everything else and to appreciate author's digital home.