Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Benchmark

scripts/bench.sh emits bench/bench.lt for all three targets and measures its usage program (best of 3). Workload: build a Map of 1,000 entries via map.from, 2,000 lookups, 1,000 Dict inserts, sort 500 Ints, and one round of json.stringify/parse.

Example results on the development machine (not reference numbers):

ts    891 ms
py    184 ms
go     41 ms

Read with care: the TypeScript number is dominated by vite-node startup time, not by the workload. For a fair comparison, increase the size in bench/bench.lt or reduce startup cost (compile ahead of time). Go is measured from the binary produced by go build, so it is closest to pure work time.