Loïc Baumann

@nockawa.log2n.io

I like software development

I spent weeks building an R-Tree for my database engine. It ships turned off. A flat array scan beat it, 1.4-1.75x faster overall. The tree does far less work. But CPUs don't charge you for work, they charge you for waiting. nockawa.github.io/blog/the-rtr...

The R-Tree We Built and Turned Off

Typhon's spatial index can promote a dense cell from a linear scan to a per-cell R-Tree. It ships with that promotion disabled — the threshold is int.MaxValu...

nockawa.github.io

Most backends keep two stores: one they trust, one they can afford to read. Something copies between them. Typhon is one store. Your struct IS the row. ACID transactions and your systems run in-process. A database and a compute engine: www.typhondb.io/deck/typhon-intro/ #dotnet #gamedev #database

Typhon — a database and a compute engine, in one process

Full ACID transactions. Microsecond latency. An ECS data model built for real-time systems. An 8-slide technical intro.

typhondb.io

Every database has a primary key index. Almost all are trees. We deleted ours. A B+Tree's shape exists to keep keys in order. Nothing ever asked ours for one — an entity id is a handle you can't query on. ~4x measured. nockawa.github.io/blog/why-we-... #dotnet #gamedev

Why We Eliminated the Primary Key B+Tree

Every database has a primary key index, and almost every one of them is a tree. Typhon's was too — until we noticed that nothing had ever asked it for a key ...

nockawa.github.io

A reader-writer lock: counter, 3 waiter classes, owning thread id, contention flag, full state machine - packed into one ulong. Every transition is one CompareExchange. 19ns uncontended, zero allocation, never touches the kernel. nockawa.github.io/blog/the-8-b... #dotnet #csharp #database

The 8-Byte Lock: Packing a Reader-Writer Lock Into 64 Bits

A reader-writer lock with a shared counter, three classes of waiter, an owning thread id, a contention flag and a state machine — all inside a single ulong, ...

nockawa.github.io

Stop counting, start timing. Typhon's page cache did 2N atomic ops per transaction to protect live pages. I replaced it with epoch-based reclamation (à la RCU): pin time on entry, one tick on exit. Flat 3.5 ns — 1 page or 10,000. nockawa.github.io/blog/page-ca...

Building a Page Cache That Doesn't Count: Epoch-Based Memory Management

Traditional page caches reference-count every page access — two atomic operations per page, per transaction, on counters that bounce between cores. Typhon re...

nockawa.github.io