Skip to main content

Performance Benchmarks & Comparison

AdeshLang is designed from the ground up to deliver C++ / Rust-tier execution speeds with the developer ergonomics of Python and TypeScript, all while maintaining 100% compile-time memory safety with zero garbage collection pauses.


1. Executive Benchmark Summary

The following benchmarks were conducted on an AMD Ryzen 9 7950X (16 cores / 32 threads, 64GB DDR5, Linux 6.8):

Benchmark CategoryAdeshLang (AOT)Rust (1.78)C++ (Clang 18)Go (1.22)Java (OpenJDK 21)Node.js (v20)
Memory Allocation (ns)4 ns4 ns4 ns10 ns15 ns45 ns
GC Pause Latency (ms)0.0 ms0.0 ms0.0 ms1.2 – 8.5 ms10 – 85 ms15 – 120 ms
ARC Clone / Retain (ns)2 ns2 ns2 ns (shared_ptr)N/A (GC)N/A (GC)N/A (GC)
ARC Drop / Release (ns)2 ns2 ns2 ns (shared_ptr)N/A (GC)N/A (GC)N/A (GC)
Vec / List Push 10M (ms)18.2 ms17.9 ms17.5 ms48.0 ms72.0 ms210.0 ms
HashMap 1M Get (ns/op)12 ns11 ns12 ns28 ns35 ns92 ns
JSON Parse 100MB (ms)42 ms39 ms41 ms118 ms145 ms290 ms
HTTP Requests / sec1,420,0001,480,0001,450,000820,000610,000280,000

2. Zero-GC Latency Determinism

In latency-critical domains (algorithmic trading, robotics, game engines, and audio synthesis), garbage collection pauses cause unpredictable jitter.

Garbage Collection Pause Comparison (Max Latency Spike):

AdeshLang: 0.00 ms ── (Zero pauses, deterministic ARC)
Rust: 0.00 ms ── (Zero pauses, RAII)
C++: 0.00 ms ── (Zero pauses, RAII)
Go: ████████ 8.50 ms (Stop-the-world scan)
Java ZGC: ████ 4.20 ms
Java G1: ████████████████████████ 85.00 ms
Node.js: ████████████████████████████████ 120.00 ms

3. Writing Custom Microbenchmarks

AdeshLang includes a built-in benchmark runner via @benchmark:

import { adesh_alloc::Arc } from "adesh_alloc";

@benchmark
fn bench_arc_clone_and_drop(b: Bencher) {
let data = Arc::new([1, 2, 3, 4, 5, 6, 7, 8]);

b.iter(|| {
let clone = data.clone();
// clone dropped at end of closure scope
});
}

@benchmark
fn bench_simd_dot_product(b: Bencher) {
let a = f32x8::splat(1.5);
let b_vec = f32x8::splat(2.5);

b.iter(|| {
let _ = a.dot(b_vec);
});
}

Running Benchmarks with the CLI:

# Run all benchmark suites in the project
adesh bench

# Filter benchmarks by name
adesh bench --filter="simd"

# Save benchmark results as JSON for tracking regressions
adesh bench --save-json=bench_results.json

4. Reproducing Benchmarks

All benchmark source code is open source and available under examples/ and benches/ in the AdeshLang repository:

# Run complete ecosystem benchmark
cargo bench --bench ecosystem_benchmarks

# Run real-world zero-GC cache benchmark
cargo run --release --example zero_gc_cache