Back to archive
III. Platform, DevOps & Securitysupportingsolo

Hello-World Benchmarks (C / Bun / Django / FastAPI)

Personal benchmark experiment: comparing throughput of "hello world" servers in C (facil.io), ElysiaJS/Bun, Django, and FastAPI under bombardier load — with a ready-to-publish blog post and charts.

Status
prototype
Period
n/a
AI sessions
Stack
Languages
TypeScriptCPython
Frameworks · Infra
ElysiaJS (Bun)facil.ioDjangoFastAPI/uvicorn
§01

Overview

  • What it is: An exploratory benchmark project. The same "hello world" endpoint is implemented on 4 stacks, run under load (bombardier), with measured RPS/latency/throughput + CPU/RAM. Results are consolidated into benchmark-results.md (raw numbers) and benchmark-blog.html (a polished post with tables/charts).
  • Type / status / role: other (benchmark/experiment) / prototype (one-time run) / solo — the user's sandbox folder.
  • Active period: no git in the root; files are dated ~2025-07-19. One-off experiment, not maintained.
§02

Stack

  • Languages: TypeScript (Bun), C, Python.
  • Frameworks under test (from actual sources):
  • ElysiaJS on Bun (bun_hello/index.ts) — routes /, /json, /echo, /health; tested in compiled and non-compiled flavors.
  • facil.io (C) (c_hello/main.c + Makefile) — low-level HTTP handler with manual routing on path.len/strncmp, content-type via http_mimetype_find, launched with fio_start(.threads=4, .workers=2); built with gcc -O3 -pthread.
  • Django (django_hello/, uv + .venv, has its own .git and db.sqlite3).
  • FastAPI + uvicorn (fast/fastapi-hello-world/main.py) — async routes, PlainTextResponse/JSONResponse, Python ≥3.12, uv-lock.
  • Measurement tools: bombardier (Go-based load generator); custom CPU/RAM monitors — monitor_performance.py (psutil: looks up the process by port via net_connections, writes CSV, computes avg/peak) and monitor-performance.sh (bash: lsof -ti + ps/awk, CSV + summary). MONITORING_GUIDE.md lists 6 monitoring approaches (psutil, time -l, docker stats, top/htop/pidstat, hyperfine/ab/wrk).
  • Infra/deploy: none — local runs.
  • Data: CSV metric dumps (facilio-stats.csv, empty), benchmark-results.md.
§03

What was shipped

No git history in the root — reconstructed from files.

  • 4 reference "hello world" servers implemented (one per stack), normalized to a comparable response.
  • 2 resource-monitoring tools written (Python + bash) with avg/peak aggregation and CSV dumps.
  • A series of bombardier runs performed: 125 conn × 1M requests (×2) and 125–300 conn × 2M requests; 3 tests per stack with variance (± std).
  • Results documented twice: a technical benchmark-results.md and a presentation-grade benchmark-blog.html ("Web Framework Performance Benchmark — 2025", with a table and RPS/Latency/Throughput blocks).
  • Volume: ~4 mini servers + 2 scripts + 2 reports. Compact but completed experiment with a publishable conclusion.
§04

Technical challenges

Only what files confirm.

  • Comparison fairness → the same trivial response on all stacks, a single load tool (bombardier), fixed configurations (125/300 conn, 1–2M requests), 3 repeats each with σ reported — shows understanding of "how to measure so it's comparable" (benchmark-results.md, blog "Test Methodology").
  • Low-level C server (c_hello/main.c) → manual routing on path length and strncmp, explicit content-type setting, multi-threaded/multi-process launch of facil.io (.threads=4, .workers=2), built with -O3. Shows comfort with C and systems-level HTTP outside frameworks.
  • Custom resource monitoringmonitor_performance.py maps port→PID via psutil.net_connections(), samples CPU/RAM ~1/s, computes avg/peak, writes CSV; the bash version does the same with lsof+ps+awk. This is not just "ran wrk" — it's instrumenting under the process.
  • Counter-intuitive result (main finding): ElysiaJS/Bun (~81.9k RPS, 1.52ms) beat C/facil.io (~75.5k RPS, 2.41ms) on RPS and latency for hello-world; compiled vs non-compiled Elysia made practically no difference. The Python stack is an order of magnitude slower: FastAPI ~8.8k, Django ~5.5k RPS (Django also produced isolated connection errors at 1M). A strong narrative hook.
§05

AI-assisted development

  • Sessions found: 0 in the local Claude Code sessions directory. Verified by full-path normalization — no matches for this repo (only an unrelated session directory belonging to deutsch-popper-bench).
  • Indirect AI traces: the repo has local .claude/settings.local.json (in the root and subdirs c_hello, django_hello, fast) and bun_hello/CLAUDE.md — i.e. Claude Code/Cursor was used locally, but the session transcripts in the global sessions store are absent (likely not saved/cleaned).
  • AI-workflow patterns: no data (no transcripts).
§06

Achievements & metrics

Measurable (from benchmark-results.md / blog):

  • 4 stacks tested, 5 configurations (incl. compiled/non-compiled Elysia), with 3 repeats each.
  • Final average RPS: ElysiaJS ~81.9k (1.52ms) · facil.io ~75.5k (2.41ms) · FastAPI ~8.8k (14.1ms) · Django ~5.5k (22.9ms).
  • Up to 2M requests per run, up to 300 concurrent connections.
  • 2 custom monitoring scripts (Python + bash) + a guide with 6 methods.
§07

Contributors

git shortlog · all branches

  1. Boaz Segev2,866
  2. Jan Biedermann91
  3. WHR12
  4. Benjamin Calderon11
  5. Franz Brauße10
  6. Joey Hoek2
  7. Matthew Staveley-Taylor2
  8. 0xflotus1
  9. Ananda Umamil1
  10. Gnanesh1
  11. John W Higgins1
  12. Max Schrementi1
20 contributors · +8 more not shown3,007 commits total
Currently

Open to Senior / Staff engineering roles and selective freelance — production AI, platform, and full-stack work.

Get in touch