github PerryTS/perry v0.5.17

latest releases: v0.5.1220, v0.5.1219, v0.5.1206...
3 months ago

Performance

  • Scalar replacement of non-escaping objects: Escape analysis identifies let p = new Point(x, y) where p never escapes — only used in PropertyGet/PropertySet. Fields are decomposed into stack allocas that LLVM's mem2reg promotes to registers, eliminating heap allocation entirely.
    • object_create: 10ms → 4ms (2.5x faster)
    • binary_trees: 9ms → 3ms (3x faster)
    • Peak RSS for binary_trees: 97MB → 5MB (19x reduction)
    • Perry now beats Node.js on all 15 benchmarks (was 13/15)

Features

  • Static Hermes in benchmark suite: benchmarks/suite/run_benchmarks.sh now includes Meta's Static Hermes (shermes) as a 4th comparison target alongside Node.js and Bun. Automatic TypeScript→JavaScript type-stripping via sed. Compiles with shermes -typed -O (falls back to untyped). All sections updated: timing table, startup time, binary size, peak RSS, win/loss summary.

Benchmark Results (macOS ARM64)

Benchmark Perry Node.js Bun Hermes
loop_overhead 13ms 53ms 51ms 96ms
array_write 2ms 9ms 6ms 92ms
array_read 4ms 14ms 18ms 46ms
fibonacci 310ms 991ms 514ms 2553ms
math_intensive 14ms 50ms 51ms 51ms
object_create 4ms 8ms 7ms 2ms
string_concat 0ms 2ms 1ms 1ms
method_calls 2ms 11ms 7ms 103ms
nested_loops 9ms 17ms 19ms 82ms
prime_sieve 4ms 8ms 6ms 27ms
binary_trees 3ms 9ms 7ms 3ms
factorial 24ms 592ms 99ms 112ms
closure 8ms 305ms 50ms 294ms
mandelbrot 21ms 25ms 29ms 23ms
matrix_multiply 22ms 34ms 34ms 232ms

vs Node.js: 15 faster, 0 slower | vs Bun: 15 faster, 0 slower | vs Static Hermes: 13 faster, 1 slower, 1 tied

Don't miss a new perry release

NewReleases is sending notifications on new releases.