InfoQ 中文T2·68 pts
Vercel Labs Releases scriptc: Native TS Compiler Boosts Startup Speed but Lags in Runtime
Original: TypeScript 终于能编译成原生程序了?启动快 12 倍,运行却慢 7.5 倍
- scriptc generates binaries free of Node, V8, or any JS engine, supporting macOS, Linux, Windows, and WASI.
- It employs a three-tier mechanism: default static compilation; dynamic execution via embedded QuickJS for npm packages and 'any' types; and strict rejection of incompatible syntax.
- Benchmarks show startup is ~12x faster than Bun and ~35x faster than Node, with idle HTTP services using only 1.9MiB memory.
- Using modern frameworks like Hono requires dynamic execution, pushing 62% of code into the interpreter and dropping throughput to 18.4k req/s, revealing significant performance bottlenecks.