Selected work
-
Micro-Exchange on GitHub
C++23 · Clang · perf · Google Benchmark
A limit order matching engine. Orders live in a free-list arena and an intrusive list per price level, so insert, cancel and match are O(1) and allocate nothing after startup. Level lookup is O(log n), and creating a level shifts the array.
Benchmarked 50.5M dispatched operations pinned to one core, timed with lfence and rdtscp minus a measured empty-region cost. The harness had to be fixed first: it counted failed operations as work and timed an error path. Insert costs 100 ns at 512 levels and 7.2 µs at 16,384. Throughput holds 8 to 11M ops/s in cache, 2.3M at 65k live orders.
- p99.9 cancel, in cache
- 20 ns
- p99.9 insert, 512 levels
- 100 ns
- Engine ops/s, 4k book
- 8–11M
-
itch-parser on GitHub
Rust · Miri · Clippy pedantic · UDP multicast
A byte-exact, zero-copy parser for NASDAQ's MoldUDP64 transport and TotalView-ITCH 5.0 feed. All 23 message types are read directly from the borrowed wire buffer. A session state machine detects sequence gaps, stale and duplicate packets, and session rollover.
I wrote an unsafe pointer version of the hot path and benchmarked both under LTO. The unsafe one was 3–12% slower: alias analysis was worth more than the bounds checks. Kept the safe version, verified with Miri.
- Message types
- 23
- Packet parsing
- Zero-copy
- Tests
- 72
-
distkv on GitHub
Rust · Tokio · Raft · Actor model
The Raft consensus protocol written from scratch as an async actor:
tokio::select!over mpsc and oneshot channels, so replicas share no state to lock or deadlock on.Implements the safety rules from the paper: election restrictions (§5.4.1), term-validated commit indexing (§5.4.2), randomized election timeouts, and conflict-driven log truncation on leader failover.
- Consensus
- Raft, hand-written
- Coordination
- mpsc + oneshot
- Safety rules
- §5.4.1, §5.4.2
-
lsm on GitHub
Rust · crossbeam-epoch · LEB128 · WAL
A log-structured merge tree: a lock-free skiplist memtable, a write-ahead log with binary record framing, prefix-compressed SSTables, and leveled compaction that merges K runs at a time. Reads take no lock: each one pins a snapshot version, and obsolete tables are unlinked only after the last reader releases it.
Started as an experiment. The README lists seven hypotheses about where write, read and space amplification come from, and how they move under a factorial sweep of compaction policy, size ratio, filter bits and cache policy.
- Read path
- Lock-free
- Compaction
- K-way merge
- Index
- Two-level + Bloom
-
SPSCQueue on GitHub
C++20 · CMake · GoogleTest · TSan
A bounded, zero-allocation, lock-free single-producer single-consumer ring buffer. Size is a power of two, checked with
std::has_single_bitand indexed with a mask instead of a modulo. Capacity is N-1, so full and empty are distinguishable without a counter. The lock-free requirement is astatic_assert, not a comment.Three numbers, kept apart on purpose: 3.25 ns is one enqueue and one dequeue in one thread, 109M pairs/s is pipelined throughput across cores, and a real one-way handoff is 100 ns p50. An earlier build reported 7.9 ns as cross-core latency; it was throughput measured as latency. Padding head and tail onto separate cache lines is worth 2.4× between physical cores and nothing at all between SMT siblings, so the figure means nothing without its topology.
- Single-thread pair
- 3.25 ns
- One-way handoff, same CCX
- 100 ns p50
- Padding, separate cores
- 2.4×
Toolkit
- Languages
- C · C++20/23 · Rust · Go
- Systems & concurrency
- Linux internals · lock-free structures · atomics and memory models · eBPF
- Distributed systems
- Raft · Tokio · Kubernetes · Docker
- Profiling & tooling
- perf · GDB · Valgrind · AddressSanitizer · strace · Google Benchmark · CMake · Git
Record
Education
B.Tech, Computer Engineering
Sardar Patel Institute of Technology, Mumbai
2025 to 2029 · CGPA 9.71 / 10
Honors
-
First place, SPITSec × Suraksha CTF (Moodle Meltdown)
-
Only first-year finalist, Odoo × SPIT FEC Hackathon 2025
Selected from 1,400+ teams.
Contact
Email is the fastest way to reach me.