A fun benchmark exploring what happens when you try to typecheck a TypeScript union of all JavaScript Safe Integers (from Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER). The full union file would be ~315 zettabytes, and typechecking it with TSC would theoretically require 26 yottabytes of RAM. Benchmarks compare TSC vs TSGO (the upcoming Go-based TypeScript compiler): TSGO is ~1000x faster for this use case, though it would still need ~22 yottabytes of RAM. RAM usage scales linearly with file size, and TSC pegged a single CPU core at 100% while TSGO used ~150% across cores.
Sort: