Topics /

Systems & Performance

The most popular blog posts about systems & performance on Hacker News. 340 posts.

2026
271

Even faster asin() was staring right at me

I don't normally do follow-ups and never this quick. After posting that last article, it was fun to read the comments on Reddit and Hacker News as they rolled in. I even found other discussions . I couldn't help wonder, "Could I have made it even more performant?" . After heading home I decided to take another look.

274

How many branches can your CPU predict?

Modern processors have the ability to execute many instructions per cycle, on a single core. To be able to execute many instructions per cycle in practice, processors predict branches. I have made the point over the years that modern CPUs have an incredible ability to predict branches. It makes benchmarking difficult…

276

Tracking down a Zsh history data loss bug

For many years, I sometimes discovered that commands I was sure I had run were no longer present in my Z shell history file (~/.zsh_history). In this article, I will show you how I tracked down the bug. Spoiler: ultimately, patching Zsh to make it crash loudly and analyzing the crash’s core dump was the winning…

278

How Do I Profile eBPF Code?

If we are running any eBPF workload or writing eBPF code, we want to measure its performance impact, and in this post we will demonstrate an example of how to do it. In this example, our goal is to measure the performance of file open operations, one of the most critical functions in the OS. Our code used file open…

281

The occasional ECONNRESET

Two services running on the same machine. One of them opens a listening TCP socket bound to localhost, the other one connects to that. They exchange data. Every now and then , the service that initiated the connection gets an ECONNRESET while reading data from the socket -- but no other errors show up in the logs, no…

284

Using FireWire on a Raspberry Pi

After learning Apple killed off FireWire (IEEE 1394) support in macOS 26 Tahoe, I started looking at alternatives for old FireWire equipment like hard drives, DV cameras, and A/V gear. I own an old Canon GL1 camera, with a 'DV' port. I could plug that into an old Mac (like the dual G4 MDD above) with FireWire—or even…

292

We can do better than line-buffered output

Buffered output typically comes in two flavors: fully buffered and line buffered. If output goes to a terminal then the implementation automatically selects line buffering, flushing its buffer when a line is completed so that it reaches the user immediately. Otherwise it fully buffers, holding output until the buffer…