LOGOS runs six ways: compiled through Rust, compiled to C from the program and from its bytecode, on our x86-64 JIT, on the bytecode VM, and on the tree-walking interpreter. Here is each one against the languages people pick when speed matters, from programs with English-level readability.
1.49× where every language runs the same algorithm
35 of 35 benchmarks
LOGOS (C)
2.08×
the speed of C, geometric mean
0.92× where every language runs the same algorithm
35 of 35 benchmarks
LOGOS (C, bytecode)
1.18×
the speed of C, geometric mean
0.43× where every language runs the same algorithm
35 of 35 benchmarks
LOGOS (JIT)
0.62×
the speed of C, geometric mean
0.40× where every language runs the same algorithm
35 of 35 benchmarks
LOGOS (VM)
0.03×
the speed of C, geometric mean
0.02× where every language runs the same algorithm
35 of 35 benchmarks
LOGOS (tree-walker)
0.01×
the speed of C, geometric mean
0.01× where every language runs the same algorithm
35 of 35 benchmarks
Benchmarks are easy to rig, so we've tried to make ours easy to check. Every program on this page computes the same answer in every language, byte for byte, at every size we time, and every number comes out of one script you can run on your own machine. LOGOS shows up once for every way it runs: compiled through Rust, compiled to C from the program and from its bytecode, on our x86-64 JIT, on the bytecode VM alone, and on the tree-walking interpreter. Each one's output is in the panel under the source, so you can read what actually ran.
Sometimes the compiler wins by doing less work, like folding a recursion into a closed form. Those benchmarks are marked ⚡, the second number on each card leaves them out, and the generated code is right there to read. A faster algorithm and faster machine code are two different claims, and we'd rather you didn't have to take our word for either.
Merge Sort
Top-down merge sort. (n = 3000000)
Wall-clock time at n = 3000000 — shorter bar is faster.
LOGOS
LOGOS (Rust)
211.7ms
LOGOS (C)
440.4ms
LOGOS (C, bytecode)
795.7ms
LOGOS (JIT)
813.8ms
LOGOS (VM)
10.98s
LOGOS (tree-walker)
timed out (>5min)
Systems
C (clang)
200.7ms
C++ (clang)
213.4ms
Rust
227.3ms
C (gcc)
229.6ms
C++ (gcc)
248.1ms
Zig
263.4ms
Managed
Go
302.2ms
Java
378.0ms
JavaScript
493.2ms
Transpiled
Nim
260.9ms
Scaling — time vs problem size (log–log)
LOGOS (tree-walker)
LOGOS (VM)
LOGOS (JIT)
LOGOS (C, bytecode)
LOGOS (C)
LOGOS (Rust)
Nim
JavaScript
Java
Go
Zig
Rust
C++ (clang)
C++ (gcc)
C (clang)
C (gcc)
Complexity
time O(n log n)space O(n)
Measured time growth
C (gcc)t ≈ n^1.02
C (clang)t ≈ n^1.05
C++ (gcc)t ≈ n^1.01
C++ (clang)t ≈ n^1.03
Rustt ≈ n^1.02
Zigt ≈ n^1.05
Got ≈ n^1.00
Javat ≈ n^0.63
JavaScriptt ≈ n^0.75
Nimt ≈ n^1.02
LOGOS (Rust)t ≈ n^1.04
LOGOS (C)t ≈ n^1.02
LOGOS (C, bytecode)t ≈ n^1.09
LOGOS (JIT)t ≈ n^1.01
LOGOS (VM)t ≈ n^1.05
LOGOS (tree-walker)t ≈ n^1.06
Measured space growth
C (gcc)rss ≈ n^0.86
C (clang)rss ≈ n^0.81
C++ (gcc)rss ≈ n^0.72
C++ (clang)rss ≈ n^0.73
Rustrss ≈ n^0.81
Zigrss ≈ n^0.99
Gorss ≈ n^0.80
Javarss ≈ n^0.58
JavaScriptrss ≈ n^0.38
Nimrss ≈ n^0.82
LOGOS (Rust)rss ≈ n^0.81
LOGOS (C)rss ≈ n^0.79
LOGOS (C, bytecode)rss ≈ n^0.88
LOGOS (JIT)rss ≈ n^0.60
LOGOS (VM)rss ≈ n^0.33
LOGOS (tree-walker)rss ≈ n^0.12
Memory — peak resident set size
Peak resident memory at n = 3000000 — shorter bar uses less.
Zig
68.8 MB
C (gcc)
69.8 MB
C (clang)
70.2 MB
LOGOS (Rust)
70.2 MB
Rust
70.3 MB
Nim
70.5 MB
C++ (clang)
71.4 MB
C++ (gcc)
71.8 MB
LOGOS (C)
79.9 MB
LOGOS (JIT)
80.6 MB
LOGOS (VM)
93.8 MB
Go
145.0 MB
JavaScript
240.6 MB
LOGOS (C, bytecode)
258.9 MB
Java
525.5 MB
Binary size — compiled-artifact footprint
Shipped size of the compiled program — the stripped, code-only binary you actually deploy, so every language is compared on the same basis. Shorter bar ships less; the as-built size (with symbols) is in parentheses.
Java
2 KB (2 KB as-built)
C (gcc)
14 KB (16 KB as-built)
C++ (gcc)
14 KB (16 KB as-built)
C (clang)
14 KB (16 KB as-built)
C++ (clang)
14 KB (16 KB as-built)
Zig
25 KB (915 KB as-built)
Nim
30 KB (36 KB as-built)
Rust
300 KB (1.9 MB as-built)
LOGOS (Rust)
354 KB (2.1 MB as-built)
LOGOS (C)
551 KB (556 KB as-built)
LOGOS (C, bytecode)
563 KB (568 KB as-built)
Go
1.2 MB (1.8 MB as-built)
The size of the program you actually ship. C and C++ stay tiny because the runtime lives in the system libc; Rust and Go statically link their runtimes; LOGOS compiles to a compact self-contained binary in between. Java’s figure is its bytecode alone — it still needs the JVM to run — and JavaScript has no compiled artifact at all (its footprint is the V8 engine, in the Interpreter section). As-built is the real shipped file; stripped removes debug symbols for a code-only comparison.
Language
Mean
Median
StdDev
Min
Max
User
System
CV
Runs
C (clang)
199.5ms
200.7ms
±3.6ms
193.4ms
204.9ms
170.1ms
29.3ms
0.018
10
LOGOS (Rust)
209.9ms
211.7ms
±4.6ms
201.0ms
213.7ms
181.7ms
28.1ms
0.022
10
C++ (clang)
212.2ms
213.4ms
±5.1ms
203.5ms
219.5ms
183.7ms
28.3ms
0.024
10
Rust
230.1ms
227.3ms
±4.3ms
226.6ms
238.7ms
203.5ms
26.3ms
0.019
10
C (gcc)
228.9ms
229.6ms
±1.8ms
225.4ms
231.2ms
200.3ms
28.4ms
0.008
10
C++ (gcc)
247.0ms
248.1ms
±3.7ms
240.9ms
252.6ms
217.6ms
29.1ms
0.015
10
Nim
261.6ms
260.9ms
±5.8ms
255.0ms
271.3ms
242.0ms
19.4ms
0.022
10
Zig
263.3ms
263.4ms
±1.4ms
259.6ms
264.6ms
219.1ms
44.0ms
0.005
10
Go
301.9ms
302.2ms
±2.8ms
297.9ms
306.2ms
276.5ms
40.1ms
0.009
10
Java
378.9ms
378.0ms
±3.1ms
375.5ms
385.1ms
296.2ms
126.2ms
0.008
10
LOGOS (C)
441.5ms
440.4ms
±3.9ms
436.3ms
448.0ms
415.1ms
26.1ms
0.009
10
JavaScript
493.0ms
493.2ms
±8.6ms
478.8ms
503.4ms
419.6ms
84.7ms
0.017
10
LOGOS (C, bytecode)
797.3ms
795.7ms
±4.9ms
792.9ms
807.0ms
607.1ms
187.3ms
0.006
10
LOGOS (JIT)
815.0ms
813.8ms
±6.3ms
807.7ms
826.4ms
792.2ms
22.6ms
0.008
10
LOGOS (VM)
10.98s
10.98s
±12.4ms
10.96s
11.00s
10.95s
25.4ms
0.001
10
LOGOS (tree-walker)
>5min
>5min
—
—
—
—
—
—
—
LOGOS vs JavaScript / V8
The LOGOS engine ladder — bytecode VM, copy-and-patch JIT, and the warm AOT-native tier — against Node v22.22.3 / V8.
5.8x
faster cold start than V8
2.0ms
LOGOS interpreter cold start
0.75x
the speed of V8 on compute (geomean)
Cold start — launch the engine and run a trivial program (50 runs, shorter is faster)
LOGOS interp
2.0ms
Node / V8
11.5ms
A native binary has no VM to warm up, so the LOGOS interpreter reaches first output in 2.0ms versus V8’s 12ms, about 5.8x quicker, which is what matters for short-lived work like cloud functions, CLI tools, and scripts. On long-running loops V8’s optimizing JIT pulls ahead: the interpreter is competitive on memory-bound work and behind on heavy compute, a geometric mean of 0.75x the speed of V8 across 27 benchmarks.
Engine size — the runtime you ship to execute a program (shorter ships less; stripped, code-only size in parentheses)
largo (LOGOS VM+JIT)
72.3 MB (58.8 MB stripped)
Node / V8
119.0 MB (102.1 MB stripped)
Node’s binary bundles V8, libuv, and ICU; largo bundles the transpiler, bytecode VM, and copy-and-patch JIT — each is the whole engine you ship to run a program. As-built is the real file; stripped removes debug symbols.
Merge Sort (engine: vm+jit)
Wall-clock time at n = 1441387 — shorter is faster. The interpreter runs at 0.60x the speed of V8 here.
Node / V8
239.6ms
LOGOS (eager)
401.5ms
LOGOS (tiered)
402.5ms
Source Code
The LOGOS source and the Rust it compiles to. Switch an optimization off and watch its “## No <X>” decorator appear on the LOGOS source — and the generated Rust recompile live in your browser. With every optimization on you see the cached release build; disabling them all yields plain, boring Rust.
## To native args () -> Seq of Text
## To native parseInt (s: Text) -> Int
## To mergeSort (arr: Seq of Int) -> Seq of Int:
Let n be length of arr.
If n is less than 2:
Return arr.
Let mid be n / 2.
Let mutable left be a new Seq of Int.
Let mutable right be a new Seq of Int.
Let mutable i be 1.
While i is at most mid:
Push item i of arr to left.
Set i to i + 1.
While i is at most n:
Push item i of arr to right.
Set i to i + 1.
Set left to mergeSort(left).
Set right to mergeSort(right).
Let mutable result be arr.
Let mutable li be 1.
Let mutable ri be 1.
Let mutable k be 1.
While li is at most length of left and ri is at most length of right:
If item li of left is at most item ri of right:
Set item k of result to item li of left.
Set li to li + 1.
Otherwise:
Set item k of result to item ri of right.
Set ri to ri + 1.
Set k to k + 1.
While li is at most length of left:
Set item k of result to item li of left.
Set li to li + 1.
Set k to k + 1.
While ri is at most length of right:
Set item k of result to item ri of right.
Set ri to ri + 1.
Set k to k + 1.
Return result.
## Main
Let arguments be args().
Let n be parseInt(item 2 of arguments).
Let mutable arr be a new Seq of Int.
Let mutable seed be 42.
Let mutable i be 0.
While i is less than n:
Set seed to (seed * 1103515245 + 12345) % 2147483648.
Push (seed / 65536) % 32768 to arr.
Set i to i + 1.
Set arr to mergeSort(arr).
Let mutable checksum be 0.
Set i to 1.
While i is at most n:
Set checksum to (checksum * 31 + item i of arr) & 268435455.
Set i to i + 1.
Show "" + item 1 of arr + " " + item n of arr + " " + checksum.
The Rust largo build --release hands to cargo, every optimization on.
#[allow(unused_imports)]
use std::fmt::Write as _;
use logicaffeine_data::*;
use logicaffeine_system::*;
fn args() -> LogosSeq<String> {
logicaffeine_system::env::args()
}
fn parseInt(s: String) -> i64 {
(logicaffeine_system::text::parseInt(s)) as i64
}
fn mergeSort(arr: &mut [i64]) {
let n = (arr.len() as i64);
if (n < 2) {
return;
}
let mid = (n >> 1);
let mut right: Vec<i64> = Vec::new();
let mut left: Vec<i64> = arr.logos_run_through(1, mid).to_vec();
let mut i: i64 = std::cmp::max(1, mid + 1);
right.extend_from_slice(arr.logos_run_through(i, n));
mergeSort(&mut left);
mergeSort(&mut right);
let mut result = arr;
let mut li: i64 = 1;
let mut ri: i64 = 1;
let mut k: i64 = 1;
let left_len = (left.len() as i64);
let right_len = (right.len() as i64);
while ((li <= left_len) && (ri <= right_len)) {
debug_assert!(((li - 1)) >= 0 && ((li - 1)) < (left.len() as i64), "LOGOS oracle bounds hint violated: indexing `left` out of range");
unsafe { std::hint::assert_unchecked(((li - 1)) >= 0 && ((li - 1)) < (left.len() as i64)); }
debug_assert!(((ri - 1)) >= 0 && ((ri - 1)) < (right.len() as i64), "LOGOS oracle bounds hint violated: indexing `right` out of range");
unsafe { std::hint::assert_unchecked(((ri - 1)) >= 0 && ((ri - 1)) < (right.len() as i64)); }
if (unsafe { *left.get_unchecked((li - 1) as usize) } <= unsafe { *right.get_unchecked((ri - 1) as usize) }) {
debug_assert!(((k - 1)) >= 0 && ((k - 1)) < (result.len() as i64), "LOGOS oracle bounds hint violated: indexing `result` out of range");
unsafe { std::hint::assert_unchecked(((k - 1)) >= 0 && ((k - 1)) < (result.len() as i64)); }
debug_assert!(((li - 1)) >= 0 && ((li - 1)) < (left.len() as i64), "LOGOS oracle bounds hint violated: indexing `left` out of range");
unsafe { std::hint::assert_unchecked(((li - 1)) >= 0 && ((li - 1)) < (left.len() as i64)); }
debug_assert!(((k - 1)) >= 0 && ((k - 1)) < (result.len() as i64), "LOGOS oracle BCE: store out of range");
let __set_val = unsafe { *left.get_unchecked((li - 1) as usize) };
unsafe { *result.get_unchecked_mut((k - 1) as usize) = __set_val; }
li = logos_add_i64(li, 1);
} else {
debug_assert!(((k - 1)) >= 0 && ((k - 1)) < (result.len() as i64), "LOGOS oracle bounds hint violated: indexing `result` out of range");
unsafe { std::hint::assert_unchecked(((k - 1)) >= 0 && ((k - 1)) < (result.len() as i64)); }
debug_assert!(((ri - 1)) >= 0 && ((ri - 1)) < (right.len() as i64), "LOGOS oracle bounds hint violated: indexing `right` out of range");
unsafe { std::hint::assert_unchecked(((ri - 1)) >= 0 && ((ri - 1)) < (right.len() as i64)); }
debug_assert!(((k - 1)) >= 0 && ((k - 1)) < (result.len() as i64), "LOGOS oracle BCE: store out of range");
let __set_val = unsafe { *right.get_unchecked((ri - 1) as usize) };
unsafe { *result.get_unchecked_mut((k - 1) as usize) = __set_val; }
ri = logos_add_i64(ri, 1);
}
k = logos_add_i64(k, 1);
}
let left_len = (left.len() as i64);
while (li <= left_len) {
debug_assert!(((li - 1)) >= 0 && ((li - 1)) < (left.len() as i64), "LOGOS oracle bounds hint violated: indexing `left` out of range");
unsafe { std::hint::assert_unchecked(((li - 1)) >= 0 && ((li - 1)) < (left.len() as i64)); }
*result.logos_item_front_mut(k) = unsafe { *left.get_unchecked((li - 1) as usize) };
li = logos_add_i64(li, 1);
k = logos_add_i64(k, 1);
}
let right_len = (right.len() as i64);
while (ri <= right_len) {
debug_assert!(((ri - 1)) >= 0 && ((ri - 1)) < (right.len() as i64), "LOGOS oracle bounds hint violated: indexing `right` out of range");
unsafe { std::hint::assert_unchecked(((ri - 1)) >= 0 && ((ri - 1)) < (right.len() as i64)); }
*result.logos_item_front_mut(k) = unsafe { *right.get_unchecked((ri - 1) as usize) };
ri = logos_add_i64(ri, 1);
k = logos_add_i64(k, 1);
}
return;
}
fn main() {
std::panic::set_hook(::std::boxed::Box::new(|_logos_info| {
logicaffeine_system::io::flush_stdout();
let _logos_msg = _logos_info.payload().downcast_ref::<&str>().map(|s| s.to_string())
.or_else(|| _logos_info.payload().downcast_ref::<String>().cloned())
.unwrap_or_else(|| "LOGOS runtime error".to_string());
eprintln!("{}", _logos_msg);
if !logicaffeine_system::failure::is_caught() { std::process::exit(1); }
}));
logicaffeine_system::stack::run_main(_logos_main);
}
fn _logos_main() {
let arguments = args();
let n = logicaffeine_system::text::parseInt((arguments.borrow().logos_item_front(2).clone()).to_string());
let mut arr: Vec<i64> = Vec::with_capacity((n as usize) as usize);
let mut seed: i64 = 42;
{
let mut arr = &mut arr;
for i in 0..n {
seed = (((((seed) as u32).wrapping_mul(1103515245u32).wrapping_add(12345u32)) & 2147483647u32) as i64);
arr.push(((seed >> 16) & 32767));
}
}
let mut i: i64 = (0_i64).max(n);
mergeSort(&mut arr);
let mut checksum: i64 = 0;
let __arr_bhl = arr.len() as i64;
let __arr_bh_ok = n <= __arr_bhl;
{
let arr = &arr[..];
if __arr_bh_ok {
for i in 0..n {
unsafe { std::hint::assert_unchecked(n <= __arr_bhl); }
checksum = { let __bwl1: i64 = (*arr.logos_item_front((i + 1))); match (|| -> Option<i64> { Some(checksum.checked_mul((31i64))?.checked_add(__bwl1)?) })() { Some(__bwlv) => (__bwlv & 268435455i64), _ => logos_cold_path(move || logos_band_exact(logos_add_exact(logos_mul_exact(checksum, 31i64), __bwl1), 268435455i64)) } };
}
} else {
for i in 0..n {
checksum = { let __bwl1: i64 = (*arr.logos_item_front((i + 1))); match (|| -> Option<i64> { Some(checksum.checked_mul((31i64))?.checked_add(__bwl1)?) })() { Some(__bwlv) => (__bwlv & 268435455i64), _ => logos_cold_path(move || logos_band_exact(logos_add_exact(logos_mul_exact(checksum, 31i64), __bwl1), 268435455i64)) } };
}
}
}
show(&format!("{}{}{}{}{}{}", "", (*arr.logos_item_front(1)), " ", (*arr.logos_item(n)), " ", checksum));
}
import sys
sys.setrecursionlimit(1000000)
def merge_sort(arr):
n = len(arr)
if n < 2: return
mid = n // 2
left = arr[:mid]
right = arr[mid:]
merge_sort(left)
merge_sort(right)
i = j = k = 0
while i < mid and j < n - mid:
if left[i] <= right[j]: arr[k] = left[i]; i += 1
else: arr[k] = right[j]; j += 1
k += 1
while i < mid: arr[k] = left[i]; i += 1; k += 1
while j < n - mid: arr[k] = right[j]; j += 1; k += 1
def main():
n = int(sys.argv[1])
arr = []
seed = 42
for _ in range(n):
seed = (seed * 1103515245 + 12345) % 2147483648
arr.append((seed >> 16) & 0x7fff)
merge_sort(arr)
checksum = 0
for v in arr: checksum = (checksum * 31 + v) & 268435455
print(f"{arr[0]} {arr[-1]} {checksum}")
if __name__ == "__main__":
main()
import os, strutils
proc mergeSort(arr: var seq[int64]) =
let n = arr.len
if n < 2: return
let mid = n div 2
var left = arr[0..<mid]
var right = arr[mid..<n]
mergeSort(left)
mergeSort(right)
var i, j, k: int = 0
while i < left.len and j < right.len:
if left[i] <= right[j]: arr[k] = left[i]; i += 1
else: arr[k] = right[j]; j += 1
k += 1
while i < left.len: arr[k] = left[i]; i += 1; k += 1
while j < right.len: arr[k] = right[j]; j += 1; k += 1
proc main() =
let n = parseInt(paramStr(1))
var arr = newSeq[int64](n)
var seed: int64 = 42
for i in 0..<n:
seed = (seed * 1103515245 + 12345) mod 2147483648
arr[i] = (seed shr 16) and 0x7fff
mergeSort(arr)
var checksum: int64 = 0
for v in arr: checksum = (checksum * 31 + v) and 268435455
echo arr[0], " ", arr[^1], " ", checksum
main()
Compilation Times
Time to compile each benchmark from source, with the same flags the timed builds use. LOGOS compiles through Rust or through C, so its bars include rustc or the C compiler at full optimization.
Geometric-mean speed vs C across all 35 benchmarks (bars proportional to speed; higher is faster).
LOGOS
LOGOS (Rust)
4.16×
LOGOS (C)
2.08×
LOGOS (C, bytecode)
1.18×
LOGOS (JIT)
0.62×
LOGOS (VM)
0.03×
LOGOS (tree-walker)
0.01×
Systems
C (clang)
1.13×
C++ (clang)
1.13×
Zig
1.09×
Rust
1.05×
C (gcc)
1.00×
C++ (gcc)
0.99×
Managed
Go
0.83×
Java
0.72×
JavaScript
0.52×
Transpiled
Nim
1.10×
Each benchmark measured with hyperfine (10 runs, 2 warmup), pinned to the performance cores on a machine checked quiet first; the bars show the median, and every ratio and geometric mean uses the mean.
CPU: Intel(R) Core(TM) i9-14900K.
OS: Ubuntu 24.04.2 LTS x86_64.
Every implementation runs the same algorithm, with its sorts and hash tables hand-rolled in every language, and produces identical output, verified byte for byte before anything is timed.
Every compiled language is built at its fastest release setting for this CPU, with the commands below; C, C++ and Nim compile with floating-point contraction off, as every other language rounds each operation.
With the algorithm unchanged, the LOGOS compiler also chooses storage the other programs spell out: an Int it proves fits in 32 bits is stored in 32 bits, a local Seq of Bool is held one bit per item, and the remainder of a value proven below twice its divisor is one subtraction. These count as the same algorithm.
Two geometric means are reported vs C: the headline keeps all 35 benchmarks; the apples-to-apples figure removes the 8 where the LOGOS compiler collapses the algorithm (⚡). Every collapse is auditable in the generated Rust per benchmark.
The Interpreter-vs-V8 section is a separate peer comparison (LOGOS bytecode VM + JIT against Node/V8) at interpreter-calibrated sizes, so its n differs from the compiled section.
Compiler Versions
Language
Version
Rust
rustc 1.96.0 (ac68faa20 2026-05-25)
Other
Ubuntu clang version 21.1.8 (++20251221032922+2078da43e25a-1~exp1~20251221153059.70)
C++
g++ (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
LOGOS
largo 0.11.0
JavaScript
v22.22.3
Other
largo 0.11.0
Java
openjdk 21.0.12.1 2026-08-18
Other
largo 0.11.0
Go
go version go1.22.2 linux/amd64
Zig
0.15.2
C
gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Nim
Nim Compiler Version 2.0.4 [Linux: amd64]
Other
Ubuntu clang version 21.1.8 (++20251221032922+2078da43e25a-1~exp1~20251221153059.70)