Backoff & Memory Provisioning: Adaptive Spinning, Custom Allocators, NUMA & Huge Pages Part 6 of Low-Level Systems Design in Rust - a series on writing high-throughput, low-latency systems code, using...
Scalar Replacement of Aggregates: How "Copy to Locals" Unlocks the Compiler Some performance fixes look almost suspiciously small in the diff. You change a couple of lines, the code still says the sam...
Why x86 Zeroes a Register With xor eax, eax If you have ever disassembled a program - even a trivial one - you have almost certainly seen this line: xor eax, eax It looks like a riddle. The instructio...
Set-Associative Caches: Trading Global Optimality for Predictable Speed Caches are everywhere in modern systems: CPU L1/L2 caches, database buffer caches, storage-engine object caches, and application...
Building a custom Bitset - A study in access-pattern-driven data structure choice I was porting porcupine-rust to Zig - the core of the implementation is a Bitset data structure, which is used in the ...
Zig Allocation Patterns A reference for the allocation and ownership patterns used in porcupine-zig, plus the broader landscape of Zig allocator idioms. Examples cite types and functions in the codeba...
Evaluating PBT Frameworks: How Proptest and Hegel Differ in Algebraic Expressivity Context I have recently been working on porcupine-rust is a Rust port of Porcupine, a linearizability checker for con...
The RAII Drop-Guard Pattern in Rust Context In Rust, any value that owns a resource and frees it in its Drop implementation acts as a guard: the resource lives for exactly as long as the value is in s...
Pin> in Traits - Why the Manual Desugar? Context When a Rust trait needs async methods and must be usable as a trait object ( Box, &dyn Trait, Arc ), you cannot just write async fn and move on. async ...