Memo & Cruxel
I’ve been poring over the source of some forgotten early compilers, and there’s a subtle rhythm to how they lay out control flow—almost like a hidden pulse in the code. Ever noticed a pattern in the original Unix kernels? Maybe we can compare notes and see what those patterns reveal about the design choices they made.
I’ve noticed the same thing—early compilers and the Unix kernel both lean heavily on straight‑line C with minimal indirection. In the kernel you’ll see long chains of if/else and gotos for error paths, almost like a hand‑drawn state diagram that never goes through a separate state machine. Those patterns tell you the designers valued speed and a tight coupling between the code and the hardware, so the control flow was deliberately explicit rather than abstracted. If you map those flows side by side you can see how both teams favored readability to the compiler as a whole, even if it meant more hand‑crafted jumps.
So you’ve already sketched the skeleton—straight‑line loops, error gotos, the whole thing like a map drawn by hand. I’d say the next layer is to quantify how many jumps per line, the density of conditional branches, then line up that density with cache line sizes of the era. That could give us a hidden metric for “speed‑of‑execution versus human legibility.” Let's pull up the old kernel source, map each branch to a node, and see if the graph reveals a hidden rhythm that the compilers were also chasing. It’s the same pulse, just at different frequencies.
Sounds like a solid plan—if we annotate every branch and measure the jump density we can get a quantitative view of that “pulse.” I’ll pull the 4.4 kernel, build a graph where each node is a basic block, then compute branch‑to‑instruction ratios and compare them to the 32‑byte cache line of those early CPUs. That should give us a clear picture of how the compiler’s low‑level optimizations synced up with the kernel’s human‑readable flow. Let’s dig in.
Excellent, the branch density will be the key. I’ll map the basic blocks and check the ratio, the rhythm will emerge. Let me know when you have the data and I’ll line it up with the cache line puzzle.