Skip to content
PT

Static copy

Copied from docs/en/evidence/cross-language.md in https://github.com/poppy-team/aipo-lang (MIT). Pinned to revision ce47c4e070404fc41722ccd8e2b7b808b99062a8, blob 31575dfc7a9d96ebbe30c38d78284ae3c602d835. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.

Cross-Language Benchmarks ​

Aipo provides a standardized benchmarking harness (aipo-bench --compare) evaluating wall-clock execution speed and memory footprint (Peak RSS) against established runtime ecosystems.


Benchmark Scope ​

Our goal is measuring real-world workload execution costs without obscuring architectural distinctions between interpreters, JIT compilers, and ahead-of-time compiled native code:

  • Aipo VM In-Process: Compilation occurs before the clock starts; measures VM instantiation, call frame allocation, and bytecode instruction dispatch.
  • Aipo CLI / VM (aipo run): Cold process startup (source reading, lexing, parsing, semantic analysis, bytecode emission, and execution).
  • Aipo → JavaScript (Node.js): Emitted JavaScript executed on the V8 engine via aipo-js.
  • Reference Runtimes: Lua 5.4, LuaJIT, Wren 0.4.0, Luau 0.739, CPython 3.12, PyPy 8.0.0, Ruby, and native Rust (algorithmic baseline).

Six Canonical Workloads ​

All benchmarks compute a standardized checksum:<value> to verify that optimizing compilers did not elide legitimate computation:

WorkloadMeasured DomainPrimary Evaluation Goal
arithmeticTight loop with function calls and intensive mathBasic dispatch overhead and call frame mechanics
collectionsDynamic list construction and traversalHeap allocation pressure and container indexing
fieldsStruct with 6 fields, mutation, and method callsProperty lookups and monomorphic field caching
stringsIncremental ASCII string concatenationsText buffer growth and reallocation characteristics
recursionDeep recursive calculation of Fibonacci(24)Call stack depth and pure invocation overhead
startupMinimal process initialization and exitCold startup time and standard library bootstrap

Reproducing the Results ​

To reproduce these measurements locally:

bash
# Compile binaries in optimized release mode
cargo build --release -p aipo-cli -p aipo-bench

# Execute the complete comparison suite
target/release/aipo-bench --compare --compare-json target/cross-language.json

# Quick developer smoke run
target/release/aipo-bench --compare --compare-quick