Proper support for sum types or tagged unions have become table stakes for systems programming languages. However, they can incur a lot of memory fragmentation that's not trivial to avoid without good support for metaprogramming. This post goes into Zig's powerful comptime feature, and how it allows some radical approaches to efficient data structure design.| Adrian Alic's Blog
In this post I take a look at a popular Rust crate for generating lexers called logos. One of its goals is to compile regex specifications down to a jump-table FSM that is supposedly faster than anything you'd write by hand. This claim nerd-sniped me into writing a hand-rolled SIMD lexer, against which I'll put logos to the test.| Adrian Alic's Blog
Custom-width integers are an interesting language feature. They open the door to several efficiency optimizations - both in hardware and software. In this post I'll be making an argument in favor of custom-width integers, and why modern systems programming languages should absolutely have them.| Adrian Alic's Blog
I recently began writing a bounded, wait-free MPSC queue in Rust. A very common advice for ring-buffer based implemenations is to prevent the tails and heads from mapping to the same cache line. In this article, I would like to find out the concrete performance penalty of false sharing for my data structure by performing tests on both ARM (Apple Silicon) and x86 (Intel/AMD) processors.| alic.dev