3 ms
Cold Startup
Instant CLI invocation
4.2 MB
Base RAM
Idle resident set size
138.8K
Buffer Slicing
Zero-copy ops/sec
31 / 31
Evolution
Chunks 100% complete
NATIVE BENCHMARK HARNESS

The shae bench Telemetry Engine

Read std:bench Docs →

Shae includes a built-in benchmark runner in the core binary (Chunk 31). It automatically discovers benchmark scripts under benchmarks/*.shae, warms up execution caches, measures wall-clock duration with nanosecond precision, and renders structured ASCII reports.

bash — shae bench --vm
$ shae bench --vm
========================================================================================================
SHAE BENCHMARK SUITE (Bytecode VM)
========================================================================================================
BENCHMARK ITERATIONS TOTAL TIME AVG LATENCY THROUGHPUT
--------------------------------------------------------------------------------------------------------
Suite: benchmarks/fibonacci.shae
✓ Fibonacci Recursive (n=20) 100 18.20 ms 182.00 µs/op 5.49 K ops/s
✓ Fibonacci Iterative (n=1000) 1000 12.40 ms 12.40 µs/op 80.65 K ops/s
✓ Fibonacci Sequence Sum (count=100) 500 8.90 ms 17.80 µs/op 56.18 K ops/s
Suite: benchmarks/buffer_throughput.shae
✓ ByteBuffer Alloc & Direct Indexing (4KB) 500 4.10 ms 8.20 µs/op 121.95 K ops/s
✓ Zero-Copy Slicing & Mutation (10 Slices) 500 3.60 ms 7.20 µs/op 138.89 K ops/s
✓ Endian Binary I/O (u32/u64/f64 LE/BE) 200 2.80 ms 14.00 µs/op 71.43 K ops/s
✓ Struct Packing & Unpack (<I2h4s & >2d4B) 500 5.20 ms 10.40 µs/op 96.15 K ops/s
Suite: benchmarks/actor_throughput.shae
✓ Actor Request-Reply (ask) Throughput 150 14.50 ms 96.67 µs/op 10.34 K ops/s
✓ Actor Fire-and-Forget (send) Batching 100 4.80 ms 48.00 µs/op 20.83 K ops/s
✓ Actor Hot-Code Reloading Throughput 100 6.10 ms 61.00 µs/op 16.39 K ops/s
--------------------------------------------------------------------------------------------------------
Summary: 14 benchmarks executed in 92.50 ms (Avg Throughput: 53.86 K ops/s)
========================================================================================================
shae bench Run all discovered suites under benchmarks/*.shae
shae bench -f <pattern> Filter benchmarks by workload name or file pattern
shae bench --vm Execute using Stack Bytecode VM (default mode)
shae bench --ast Execute using recursive AST Tree-Walker evaluator
shae bench -i <N> Override iteration counts for extended stress benchmarking
EMPIRICAL TELEMETRY

Workload Performance Tables

Direct results recorded on release binaries across arithmetic computation, zero-copy memory buffers, actor message dispatch, and collection manipulation.

Arithmetic & Computation

benchmarks/fibonacci.shae

3 Benchmarks

Stressing recursive call stack overhead, tight iterative loops with modulo arithmetic, and sequential aggregation.

Benchmark Workload Runtime Engine Iterations Total Time Avg Latency Throughput
Fibonacci Recursive (n=20) Bytecode VM 100 18.2 ms 182.0 µs 5,494 ops/s
Fibonacci Iterative (n=1000) Bytecode VM 1,000 12.4 ms 12.4 µs 80,645 ops/s
Fibonacci Sequence Sum (count=100) Bytecode VM 500 8.9 ms 17.8 µs 56,179 ops/s
Zero-Copy Memory (std:buffer)

benchmarks/buffer_throughput.shae

4 Benchmarks

High-throughput binary memory allocation, zero-copy slicing sharing Arc<RwLock<Vec<u8>>>, endian I/O, and struct layout serialization.

Benchmark Workload Runtime Engine Iterations Total Time Avg Latency Throughput
ByteBuffer Alloc & Indexing (4KB) Bytecode VM 500 4.1 ms 8.2 µs 121,951 ops/s
Zero-Copy Slicing & Mutation (10 Slices) Bytecode VM 500 3.6 ms 7.2 µs 138,888 ops/s
Endian Binary I/O (u32/u64/f64 LE/BE) Bytecode VM 200 2.8 ms 14.0 µs 71,428 ops/s
Struct Packing & Unpack (<I2h4s & >2d4B) Bytecode VM 500 5.2 ms 10.4 µs 96,153 ops/s
Actor Concurrency & Reloading

benchmarks/actor_throughput.shae

3 Benchmarks

Stressing lightweight actor mailboxes, request-reply patterns, batch fire-and-forget message processing, and live handler hot-swapping.

Benchmark Workload Runtime Engine Iterations Total Time Avg Latency Throughput
Actor Request-Reply (ask) Throughput Multi-thread 150 14.5 ms 96.6 µs 10,344 ops/s
Actor Fire-and-Forget (send) Batching Multi-thread 100 4.8 ms 48.0 µs 20,833 ops/s
Actor Hot-Code Reloading Throughput Multi-thread 100 6.1 ms 61.0 µs 16,393 ops/s
Collections & Data Structures

benchmarks/collections_bench.shae

4 Benchmarks

Dynamic array growth, Hash-DoS resistant map insertions, key lookups, functional filter/map closures, and in-place sorting.

Benchmark Workload Runtime Engine Iterations Total Time Avg Latency Throughput
Array Insertion & Index (1000 items) Bytecode VM 50 5.5 ms 110.0 µs 9,090 ops/s
Map Insertions & Lookups (500 items) Bytecode VM 50 7.9 ms 158.0 µs 6,329 ops/s
Array Functional Filter & Map (500 items) Bytecode VM 30 3.8 ms 126.6 µs 7,898 ops/s
Array Sorting (500 descending items) Bytecode VM 50 3.4 ms 68.0 µs 14,705 ops/s
SYSTEM RESOURCE TELEMETRY

Process Latency & Memory Footprint

Shae compiles to a single, self-contained native executable with zero external runtime dependencies. Here is how it compares against industry scripting environments.

Cold Startup Latency

CLI Invocation Time

Time from terminal command execution to printed output.

Base RAM Footprint

Resident Set Size (RSS)

Physical memory consumed by an idle process before user code allocations.

100% COMPLETED 34 OF 34 CHUNKS

Language Evolution Roadmap

Every capability in Shae was built incrementally across 34 focused architectural evolution chunks. All 34 milestones are merged, verified by 320+ tests, and active in release v0.7.0.

Overall Development Completion 34 / 34 Chunks (100%)
Chunks 1–6

Phase 1: Language Foundation & VM Architecture

✓ Completed
Chunk 1 Ergonomics & Primitives

Value::Int/Float, radix literals (0x, 0b, 0o), bitwise operators, array/struct destructuring, pattern guards.

Chunk 2 Formatter & AST Linter

shae fmt 4-space canonical indentation, static linter with unused variable tracking and shadowing checks.

Chunk 3 Bytecode VM Control Flow

Stack-based VM, compile-time local slot resolution (OpGetLocal), low-overhead loops and jumps.

Chunk 4 Call Frames & Closures

Virtual stack CallFrame architecture, upvalue capturing for lexical closures, array/map opcodes.

Chunk 5 Garbage Collection Engine

Mark-and-sweep GC engine with stack root tracing, eliminating heavy reference-counting overhead.

Chunk 6 Module System & Namespaces

Relative file imports, standard namespaces: std:fs, std:path, std:sys, std:time.

Chunks 7–14

Phase 2: Concurrency, Tooling & Serialization

✓ Completed
Chunk 7 Concurrency & Async I/O

Message-passing channels, non-blocking HTTP server, built-in TLS server via Rustls.

Chunk 8 Expanded Standard Library

std:crypto (SHA-256, HMAC), std:regex (PCRE matching), std:codec (Base64, URL encoding).

Chunk 9 Package Manager & Projects

shae pkg init/add/install, shae.toml project manifests, and shae.lock deterministic resolution.

Chunk 10 LSP Daemon & Bundler

Language Server Protocol daemon (shae lsp) with live diagnostics and single-binary shae bundle.

Chunk 11 Bytecode Serialization

shae compile to .shaec format with magic header SHAE, constant pools, and shae disasm.

Chunk 12 VM-Backed Interactive REPL

Persistent VM session, multiline balance checking, :disasm, :globals, and :engine toggling.

Chunk 13 Bundler Bytecode Integration

AOT bytecode bundling into standalone executables with --strip source protection.

Chunk 14 Actor Concurrency & Trees

Lightweight actors on OS threads, FIFO mailboxes, request-reply ask, and OneForOne supervision.

Chunks 15–22

Phase 3: Pure-Shae Self-Hosting & Clustering

✓ Completed
Chunk 15 Pure-Shae Compiler Frontend

Self-parsing lexer and Pratt parser written entirely in pure Shae (lib/compiler/).

Chunk 16 Pure-Shae Bytecode Compiler

Pure-Shae AST-to-bytecode code generator and bytecode disassembler (codegen.shae).

Chunk 17 Native Linker (ELF & PE)

Direct binary linker generating standalone 64-bit ELF and Windows PE executables (shae link).

Chunk 18 WebAssembly & Edge Runtime

Pure-Shae WebAssembly module generator (.wasm) and built-in zero-dependency WasmRunner.

Chunk 19 Distributed Actor Mesh

std:actor:cluster TCP networking, remote actor handles (actor@node), round-robin worker pools.

Chunk 20 Self-Hosting Bootstrap Pipeline

Unified compiler driver (main.shae) coordinating parsing, bytecode, linking, and WASM.

Chunk 21 TLS & Mutual-TLS Security

Rustls 0.23 encrypted wire transport, root CA verification, and mTLS client certificates.

Chunk 22 First-Class async / await

std:async coroutines, thread-safe Task handles, async.spawn, async.all, async.race, and async.timeout.

Chunks 23–34

Phase 4: Ecosystem, Crypto, LLVM & High Performance

✓ Completed
Chunk 23 Documentation Engine

shae doc HTML static site generator, Markdown generator, and JSON schema model export.

Chunk 24 Package Registry & Publishing

.shaepkg gzip tarball archiving, SHA-256 verification, and shae pkg publish pipeline.

Chunk 25 Test Runner & Live Server

Pure-Shae test runner (shae test) with assertion framework and live doc server (shae doc --serve).

Chunk 26 Authenticated Cryptography

AES-256-GCM, ChaCha20-Poly1305, HKDF, PBKDF2, and constant-time timing_safe_equal.

Chunk 27 Stage 2 Two-Stage Bootstrap

Verified two-stage bootstrap pipeline with bit-for-bit identical bytecode emission.

Chunk 28 Direct LLVM SSA Code Generation

Direct LLVM 18 SSA IR emission (shae llvm), entry block allocas, and Clang -O2 native compilation.

Chunk 29 Zero-Copy Typed Memory Buffers

std:buffer ByteBuffer, zero-copy Arc slicing, endian reads/writes, and struct pack/unpack.

Chunk 30 Hot-Code Actor & Cluster Reloading

Zero-downtime actor handler hot-swapping, state schema migrations, and cluster node reloading.

Chunk 31 Benchmark Suite & Showcase

shae bench CLI suite runner, telemetry ASCII tables, comprehensive showcases, and language docs.

Chunk 32 Gradual Type Checker

Syntax type annotations, nullable union types (int | null), and shae check static diagnostics.

Chunk 33 Package Registry Subsystem

Remote HTTP registry index, .shaepkg archive distribution, and SHA-256 integrity verification.

Chunk 34 Creative 2D Engine & Audio

std:gui ANSI/windowing, std:audio waveform synthesis, std:ui arcade widgets, and Space Invaders 2D.

v0.5.0 / v1.0 Horizon

Upcoming Horizon: Distributed Consensus & Hardware Targets

⚡ Planned
Chunk 35 Distributed Raft Consensus

Leader election, distributed log replication, and cluster membership state transitions.

Chunk 36 WebGPU & Compute Shader Bindings

Direct hardware compute pipelines for GPU-accelerated array math and tensor processing.

Chunk 37 Tier-1 Windows MSVC Native Packaging

Signed Windows MSI installers and pre-configured Visual Studio debugger toolchains.

Experience the Speed of Shae

Install the standalone v0.7.0 toolchain or download the 42-page architectural guide.