Skip to content

Instantly share code, notes, and snippets.

@Dawsson
Created July 27, 2026 02:22
Show Gist options
  • Select an option

  • Save Dawsson/2471088e01bfb6b33c78e50268b5f246 to your computer and use it in GitHub Desktop.

Select an option

Save Dawsson/2471088e01bfb6b33c78e50268b5f246 to your computer and use it in GitHub Desktop.
ScriptC vs Bun vs Node: API and CLI benchmark findings

ScriptC vs Bun vs Node: API and CLI Findings

Tested July 26, 2026 on Apple Silicon/macOS with:

  • ScriptC 0.0.16
  • Bun 1.3.12
  • Node 24.18.0
  • oha 1.15.0

Summary

  • CLI startup: ScriptC is effectively native-speed.
  • Memory: ScriptC uses dramatically less memory than Bun or Node.
  • API throughput: Bun is the best overall TypeScript server runtime.
  • Hono: ScriptC runs most Hono code through embedded QuickJS, substantially increasing CPU use and reducing throughput.
  • AWS Lambda: Do not use ScriptC for production Lambda APIs yet. It lacks a supported Lambda runtime/bootstrap path, and dynamic builds cannot currently be cross-compiled.

CLI startup

Median over 100 fresh processes:

Program Startup
ScriptC, dependency-free TypeScript 1.78 ms
Bun, same TypeScript 21.29 ms
Node, JavaScript 61.78 ms
Node, TypeScript stripping 102.61 ms
ScriptC + Commander 12.45 ms
Bun + Commander 42.08 ms
Node + Commander 126.23 ms

The measured process-launch baseline was 0.81 ms.

Hono API at equal load

The same Hono route and node:http bridge ran at 10,000 requests/second for eight seconds with concurrency 32. All responses succeeded.

Runtime Idle RSS Peak RSS CPU p50 latency
ScriptC + Hono 6.6 MiB 36.3 MiB 52% of one core 0.88 ms
Bun + Hono 47.3 MiB 87.0 MiB 24% 0.22 ms
Node + Hono 85.7 MiB 115.3 MiB 27% 0.23 ms

ScriptC used far less memory but approximately twice the CPU per request.

Hono API at saturation

Runtime Throughput Peak RSS p50 latency
ScriptC + Hono 18.4k req/s 32.5 MiB 1.47 ms
Bun + Hono 70.5k req/s 122.8 MiB 0.39 ms
Node + Hono 57.5k req/s 134.4 MiB 0.50 ms

Hono compiled under ScriptC only with --dynamic; 62% of the tested server executed in QuickJS. The standard @hono/node-server adapter did not compile because it imports unsupported node:http2, so the benchmark used a small custom bridge.

Framework-free API

Implementation Idle RSS Loaded peak Maximum throughput
ScriptC native node:http 1.9 MiB 2.7–2.8 MiB 45.7–47.2k req/s
Bun native Bun.serve 24.2 MiB 35.1 MiB 95.1k req/s
Bun running node:http 31–34 MiB 95–102 MiB 73–86k req/s
Node running node:http 83–84 MiB 101–108 MiB 71–75k req/s

At a controlled 10,000 requests/second, CPU use was:

  • ScriptC native node:http: 27%
  • Bun running node:http: 29%
  • Node running node:http: 33%
  • Native Bun.serve: 21%

Recommendation

  • Use ScriptC experimentally for small, latency-sensitive CLIs and framework-free tools.
  • Use Bun with Bun.serve for long-running TypeScript APIs.
  • Use Bun for Hono APIs.
  • Keep Bun or Node for AWS Lambda until ScriptC has a supported Runtime Interface Client/bootstrap and targetable dynamic Linux builds.
  • Benchmark real application logic before adopting ScriptC: npm dependencies may move execution into QuickJS, trading memory and startup improvements for lower steady-state throughput.

These are local microbenchmarks, not production or Lambda measurements. Database clients, SDK initialization, logging, networking, Lambda memory allocation, and cold-start infrastructure can materially change the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment