A creator benchmarks ScriptC, an experimental tool from Vercel Labs that compiles TypeScript directly to a debuggable C backend or LLVM IR (and then a static binary), against Node.js and Bun. Across minimum memory usage, million-object allocation, and server startup time tests, ScriptC dramatically outperforms both: 2.2MB vs 40MB (Bun) vs 70MB (Node) minimum memory, 88MB vs 176MB vs 259MB with a million objects, and 2.3ms vs 15.8ms vs 56ms startup time. ScriptC achieves this by compiling TypeScript type definitions into real C structs with reference counting instead of garbage collection, producing far smaller memory footprints than V8's object representation. A fourth test simulating a real-time multiplayer game showed similar performance across all three runtimes but much lower memory usage for ScriptC (30-58MB vs 131-228MB). The author concludes ScriptC isn't production-ready but is a genuinely interesting direction, especially for serverless cold-start scenarios and, speculatively, for reducing Electron's notorious memory usage.

12m watch time

Questions this post answers

How much less memory does ScriptC use compared to Node.js and Bun for a minimal program?

ScriptC uses about 2.2 megabytes at minimum memory startup, compared to roughly 40 megabytes for Bun and 70 megabytes for Node.js (version 26) at the P10 percentile. This pattern holds across percentiles up to P99, where all three environments increase but ScriptC remains dramatically smaller because it compiles to a static binary instead of running on a JavaScript engine. Developers comparing JavaScript runtime memory footprints can track experimental tools like ScriptC on daily.dev.

Why does ScriptC use less memory than V8 when allocating many TypeScript objects?

ScriptC compiles TypeScript type definitions into real C structs with reference counting instead of garbage collection, so a typed object becomes a struct of only 72 bytes, versus roughly 140 bytes for the equivalent object in V8 and about 88 bytes in JavaScriptCore. In a test allocating a million objects, this resulted in 88 megabytes of memory usage for ScriptC versus 259 megabytes for Node.js and 176 megabytes for Bun. Anyone weighing memory-hungry JavaScript runtimes against emerging compiled alternatives can follow this space on daily.dev.

How does ScriptC's server startup time compare to Node.js and Bun?

ScriptC starts a server and accepts a TCP connection in about 2.3 milliseconds, compared to roughly 15.8 milliseconds for Bun and 56 milliseconds for Node.js. This speed comes from ScriptC compiling TypeScript to a static binary via a C or LLVM IR backend rather than running through a JIT-compiled JavaScript engine, which is especially relevant for serverless cold-start scenarios. Teams optimizing serverless cold-start latency can keep tabs on tools like ScriptC through daily.dev.

602.7K Impressions8 Comments