Benchmarks

Constructs

Identity · Shared binding mutation

Mutate one array cell through a stable binding path and observe every update through its original owner path

Identity

Shared binding mutation

40m mutations · 30 runs

Mutate one array cell through a stable binding path and observe every update through its original owner path

C 123.0 msabsolute best
Rust 123.1 ms
C++ 123.8 ms
Go 124.3 ms
Swift 124.8 ms
Range 133.8 ms
Test code
C · main.c
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct{int64_t value;}Counter;typedef struct{int64_t *value;}View;
int main(int argc,char**argv){
    int64_t n=argc>1?atoll(argv[1]):40000000,checksum=0;
    Counter *counter=malloc(sizeof(*counter));counter->value=0;
    View *view=malloc(sizeof(*view));view->value=&counter->value;
    for(int64_t i=0;i<n;i++){counter->value=i+1;checksum=(checksum+*view->value)%1000003;}
    printf("%" PRId64 "\n",checksum);
}
Range · Playground.range
construct View { binding values: [Int] }
@main {
    state values: [0]
    let view: View(values: $values)
    state i: Int(0)
    state checksum: Int(0)
    while i < 40000000 {
        view.values[0]: i + 1
        checksum: (checksum + values[0]) % 1000003
        i: i + 1
    }
    return checksum % 251
}

Measurements

Range passed

LanguageWallCPUPeak memoryRelativeOutput
C123.0 ms120.6 ms1.6 MB1.00×7140
Rust123.1 ms120.9 ms1.8 MB1.00×7140
C++123.8 ms121.4 ms1.6 MB1.01×7140
Go124.3 ms122.2 ms4.0 MB1.01×7140
Swift124.8 ms121.9 ms2.0 MB1.01×7140
Range133.8 ms131.6 ms1.7 MB1.09×exit:112

Run procedure

01Generated sourceisolated case directory
02 · optimized builds
  • Ccc · O3
  • C++c++ · O3
  • Rustrustc · opt 3
  • Gogo build
  • Swiftswiftc · Ounchecked
  • RangeLLVM · clang O3
03Rotating run order30 measured runs
04Validate outputexit code + identical result
05Median resultswall · CPU · peak RSS
Commands and notes
Suite
N=<base-iterations> RUNS=<sample-count> npm run benchmarks
C
cc -O3 -mcpu=native main.c -o speed-c
./speed-c <iterations>
Range
RangeCompiler emit-llvm Playground.range Main.ll
clang -O3 -mcpu=native -Wno-override-module Main.ll <runtime-sources> -o speed-range
./speed-range
  • The workload count is specialized per leaf; some leaves intentionally scale it down to keep total work comparable.
  • Wall time includes process execution but excludes source generation and compilation.
  • A result is published only when output remains stable across every measured run.
  • Bun and TypeScript rows are omitted when their local toolchains are unavailable.