Repository navigation
v0.12.2
What's Changed
Performance progress
Lower latency is better. Published results use five discarded warmup processes, 30 interleaved fresh processes, ten independent one-second throughput windows, and identical checksums across engines.
Focused compute kernels
| Scenario | QuickJS | QuickJS + forced Tier 2 | Bun 1.4.0 | QuickJS vs JIT | JIT vs Bun |
|---|---|---|---|---|---|
| Scalar loop | 836.946 us | 25.837 us | 12.983 us | JIT 32.39x faster | JIT 1.99x slower |
| Numeric loop | 823.818 us | 25.715 us | 12.358 us | JIT 32.04x faster | JIT 2.08x slower |
Iterative Fibonacci, fib(40) x 2000 |
33.780 ms | 753.907 us | 1.093 ms | JIT 44.81x faster | JIT 1.45x faster |
These kernels demonstrate a profitable machine-code path using guarded unboxed Int32/Float64 SSA, native arithmetic, loop-carried Phi values, exact deoptimization, and compiled-to-compiled scalar calls. They are focused forced-Tier-2 results, not a claim that arbitrary JavaScript is 30–45x faster.
Broad JavaScript matrix
The broad run compares interpreter, forced Tier 1, forced Tier 2, automatic tiering, and Bun using the same scripts and sampling policy. A JIT result is shown only if the worker actually entered native code; N/A means interpreter-only execution and is not reported as JIT performance.
| Workload | QuickJS | Best native JIT | Bun 1.4.0 | Result |
|---|---|---|---|---|
| Float64-dense | 2.829 ms | 322.982 us (Tier 2) | 462.551 us | JIT 8.76x faster than QuickJS and 1.43x faster than Bun |
| Strings / RegExp | 19.379 ms | N/A | 2.436 ms | No native entry; Bun 7.96x faster than QuickJS |
| Arrays / TypedArrays | 4.677 ms | 13.141 ms (Tier 1) | 770.318 us | JIT 2.81x slower than QuickJS; Bun 17.06x faster than JIT |
| Objects / polymorphic shapes | 6.687 ms | N/A | 829.039 us | No native entry; Bun 8.07x faster than QuickJS |
| Calls / recursion / closures | 7.389 ms | N/A | 1.595 ms | No native entry; Bun 4.63x faster than QuickJS |
| JSON codec | 79.053 ms | N/A | 8.844 ms | No native entry; Bun 8.94x faster than QuickJS |
| Map / Set / BigInt | 15.308 ms | N/A | 2.171 ms | No native entry; Bun 7.05x faster than QuickJS |
| Exceptions / Promise / async | 2.483 ms | N/A | 741.949 us | No native entry; Bun 3.35x faster than QuickJS |
Float64 is profitable and exceeds Bun for this specific kernel. Arrays/TypedArrays reach Tier 1 but remain substantially unprofitable. The other six workers provide honest QuickJS/Bun reference points and identify native-coverage work instead of presenting fallback timing as acceleration.
New Contributors
Full Changelog: https://github.com/longbridge/rquickjs/commits/v0.12.2