Performance
- Scalar replacement of non-escaping objects: Escape analysis identifies
let p = new Point(x, y)wherepnever escapes — only used inPropertyGet/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.shnow includes Meta's Static Hermes (shermes) as a 4th comparison target alongside Node.js and Bun. Automatic TypeScript→JavaScript type-stripping viased. Compiles withshermes -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