Topics /

Systems & Performance

The most popular blog posts about systems & performance on Hacker News. 4,389 posts.

Any year
2401

A lock-free, concurrent, generic queue in 32 bits

While considering concurrent queue design I came up with a generic, lock-free queue that fits in a 32-bit integer. The queue is “generic” in that a single implementation supports elements of any arbitrary type, despite an implementation in C. It’s lock-free in that there is guaranteed system-wide progress. It can…

2407

Let's Write Some x86-64

…"‘Our speech interposes itself between apprehension and truth like a dusty pane or warped mirror. The tongue of Eden was like a flawless glass; a light of total understanding streamed through it. Thus Babel was a second Fall.’ And Isaac the Blind, an early Kabbalist, said that, to quote Gershom Scholem’s translation…

2409

Galois field instructions on 2021 CPUs

CPUs like to operate on data types such as uint8_t , uint16_t , uint32_t , and uint64_t . These data types can be viewed as integers modulo 2 8 , 2 16 , 2 32 , and 2 64 respectively. Addition and multiplication can be defined on these integers modulo 2 N in a way which is familiar to most people; for example, in…

2410

Spectre Mitigations in Microsoft's C/C++ Compiler

This form of Spectre can be used to attack a broad range of software -- operating systems, device drivers, web APIs, database systems, and almost anything else that receives untrusted input and may run on the same computer as untrusted code. Because large programs can contain literally millions of conditional branches…

2411

Parsing integers quickly with AVX-512

If I give a programmer a string such as "9223372036854775808" and I ask them to convert it to an integer, they might do the following in C++: std::string s = .... uint64_t val; auto [ptr, ec] = std::from_chars(s.data(), s.data() + s.size(), val); if (ec != std::errc()) {} // I have an error ! // val … Continue reading…

2414

Dissecting Apple's Sparse Image Format (ASIF)

At WWDC 2025, Apple announced macOS 26 Tahoe. One of the new features in macOS Tahoe is a new disk image format: ASIF. Designed for use with virtual machines (its documentation lives under the Virtualization framework), ASIF takes a lot of inspiration from existing virtual disk formats. Practically, that means it’s…

2415

Verifying distributed systems with Isabelle/HOL

We use distributed systems every day in the form of internet services. These systems are very useful, but also challenging to implement because networks are unpredictable. Whenever you send a message over the network, it is likely to arrive quite quickly, but it’s possible that it might be delayed for a long time, or…

2416

Unix is not an acceptable Unix

The Unix command line is full of surprises. For instance: did you know that the OS X version of the ls tool, most frequently used to get a list of the files in the current working directory, recognizes no fewer than 38 different flags?

2427

FreeBSD/EC2 on C5 instances

Ever since the first EC2 instances launched — the ones which were retrospectively named "m1.small" — Amazon has relied on the Xen hypervisor. No longer: C5 instances use KVM. This sounds like it would be a problem, but in fact that change didn't bother FreeBSD at all: Now that everything uses hardware-based paging…

2429

Defragging my old Dell's UEFI NVRAM

I’m setting up an old Dell box (2011-era tech). I was migrating to some new boot drives and setting up grub on them again. Got to the point of deleting the old boot entries and adding new ones, and got an error like Could not prepare boot variable: No space left on device. Weird, because there weren’t that many EFI…