HOW DOES A DATABASE ACTUALLY FIND YOUR DATA?
A deep dive into B-Trees, LSM Trees, and the underlying storage engines that power modern persistence layers. Understanding the mechanics beneath the abstraction.
Engineering Notebook
I build reliable, high-performance software systems. My core interest lies in understanding abstractions deeply—from the database engine up to distributed AI inference layers—and removing friction for other developers.
Technical deep-dives into computer systems, databases, and compilers.
A deep dive into B-Trees, LSM Trees, and the underlying storage engines that power modern persistence layers. Understanding the mechanics beneath the abstraction.
Breaking down the lexing, parsing, and code generation phases by building a minimal compiler from scratch in Rust. Learning through deconstruction.
Production-ready open-source engines and system tools.
A custom inference engine designed to optimize memory bandwidth and reduce latency for local LLM deployment. Built in C++ and CUDA to achieve 90%+ theoretical memory bandwidth utilization.
__global__ void flash_attention_v2_kernel(
const half* __restrict__ Q,
const half* __restrict__ K,
const half* __restrict__ V,
half* __restrict__ O,
const int seq_len,
const int head_dim
) {
// Shared memory allocations for tiling
extern __shared__ half s_mem[];
half* s_Q = s_mem;
half* s_K = &s_mem[BLOCK_SIZE * head_dim];
// Grid-stride coalesced load into SRAM
int tid = threadIdx.x;
int bid = blockIdx.x;
...
}Understanding hardware characteristics—L1/L2 caches, register pressure, memory bandwidth—to write code that respects physical limits.
Designing APIs and architectures that conceal operational complexity while keeping high performance accessible to upstream users.
Never guessing performance bottlenecks. Driven by micro-benchmarks, trace analysis, flamegraphs, and hardware telemetry.