Writing a PHP 8.5 Router Faster Than FastRoute

When working on Safi, my custom minimal PHP microframework, I initially reached for nikic/fast-route. It’s a battle-tested library that defined modern PHP routing, and I’ve always admired Nikita Popov’s classic write-up on regex routing performance.

However, since Safi focuses on zero-overhead execution, I started wondering: Can I build a dedicated router for PHP 8.5+ that runs even faster?

What followed was an intense engineering evolution—from a failed data-structure experiment to deep micro-benchmarking, and ultimately to Wajha (chani/wajha).

Here is how Wajha evolved, the micro-benchmarks that shaped its design, an honest breakdown of where its speed comes from, and its performance across both synthetic and real-world benchmarks.

Continue reading Writing a PHP 8.5 Router Faster Than FastRoute

Squeezing performance out of a Raspberry Pi 5 with an Intel Optane for LLM usage

Playing further with the Intel Optane module on my Raspberry Pi 5, I was able to squeeze out even more performance. The recipe? Changing the NVMe HAT, forcing PCIe Gen 3, overclocking the CPU, and …

Continue reading Squeezing performance out of a Raspberry Pi 5 with an Intel Optane for LLM usage

Playing with an Intel Optane on a Raspberry Pi 5

Checking out an Intel Optane module was always on my bucket list, but I never really had a solid use case for it. Recently, instead of buying a new Raspberry Pi with more physical RAM, I thought: why not give high-speed, ultra-low-latency swap a try?

Continue reading Playing with an Intel Optane on a Raspberry Pi 5