VR

Benchmarks


Reproducible performance benchmarks for key backend engineering decisions. Each benchmark isolates one variable and measures its impact.

Available Benchmarks

#BenchmarkWhat It MeasuresKey Finding
01Thread vs Async vs Event LoopMemory and CPU cost per concurrent taskAsync uses 500x less memory than threads
02TCP vs HTTP OverheadProtocol overhead per requestHTTP/2 eliminates per-request connection cost
03JSON vs ProtobufSerialization speed and wire sizeProtobuf is 3x smaller and 6x faster
04DB Indexing ImpactQuery time with/without indexIndex reduces 1M-row lookup from 800ms to 0.5ms
05N+1 vs BatchingQuery count impact on latencyJOIN is 100x faster than N+1 at 100 records
06Cache vs No CacheCache hit rate vs effective latency95% hit rate reduces effective latency 10x

Running Benchmarks

Each benchmark directory contains a README.md with complete, runnable code. Requirements: Python 3.8+ (standard library only) unless otherwise specified.

Interpreting Results

All benchmarks report:

  • p50 (median): typical case
  • p99: tail latency (worst 1%)
  • Memory usage: peak heap during benchmark
  • Throughput: requests per second at steady state

Run each benchmark 3 times and take the median. Results vary by hardware; focus on relative comparisons, not absolute values.