Comparison

Tern vs Go

Both compile to one binary and keep the language small. Tern reads like Python, has no nil and no data races, and is faster on our benchmarks. Go is mature and has a huge ecosystem.

curl -fsSL https://ternlang.dev/install.sh | sh
tern new myapp && cd myapp

Numbers

TernGo
Compute benchmarks won of 10100
HTTP plaintext, one thread169k req/s115k req/s
Spawn and join 1M tasks41 ms342 ms
100k waiting tasks28 MB277 MB
Web server binary254 KB8.1 MB
Rebuild after an edit optimized0.67 s2.54 s
Agent-built link shortener lines273805
Same app, redirects/s146k154k

What’s different

Pick Go when

Coming from Go? The coming-from guide maps Go idioms to Tern.

Questions

Is Tern faster than Go?

On our benchmarks, yes: ahead on all 10 compute benchmarks and on HTTP throughput per thread. Go served slightly more redirects per second in the agent-built app test.

Is Tern like Go?

In spirit: one binary, a small language, fast builds. The syntax is Python-like, and there is no nil and no shared mutable data.

More about Tern

Tern (ternlang) is an early release: the language will change, and so will these numbers. Benchmarks run on an Apple M4 Pro; the full tables, losses included, are on the home page.