1.08x to C, and the cases that still lose
The geometric mean is a useful summary and a bad victory lap. What the 17-case KshanexLang benchmark set actually says.
Notes from the work: what changed, what broke, and what the numbers actually say. Written while the work is still in motion.
The geometric mean is a useful summary and a bad victory lap. What the 17-case KshanexLang benchmark set actually says.
Every function of every loaded module is now emitted as LLVM IR. A stage1 link is still ahead, and the compiler fails loudly until then.
No notes with that tag yet.
Systems Software Engineer · Creator of KshanexLang
Maksym Skorina is a systems software engineer working independently on compilers and developer tools. He is the creator of KshanexLang, a statically typed, general-purpose language with a direct LLVM IR backend.
His work sits below the product layer: type systems, code generation, runtimes, and the measurement that keeps performance claims honest. The compiler, its standard library, and its language server are all built from first principles, with a small dependency surface and a reproducible test suite.
A statically typed, general-purpose language with a direct LLVM IR backend. The compiler is written in Rust from scratch: 70,316 lines, 3,265 tests, its own VS Code language server, and no external crates. Effect rows are checked at the call site (E0115), not at the declaration.
Cross-platform GUI over Win32/GDI and POSIX/X11 via @repr(C)/@cdecl, SIMD tensors and neural networks, SHA-256/HMAC, an HTTP/1.1 router and parser, JSON, and FFT.
Stage S6c emits the complete closure of every loaded module, including private functions; a stage1 link is the next milestone. The compiler stops loudly on the first shape it does not lower, rather than producing a partial binary.
| Benchmark | KshanexLang | C | Rust | Zig | Go | Swift | vs C |
|---|---|---|---|---|---|---|---|
| hashmap | 45.88 ms | 120.80 ms | 199.24 ms | 123.83 ms | 248.50 ms | 220.79 ms | 0.38x |
| matmul_transpose | 90.96 ms | 202.64 ms | 237.73 ms | 213.07 ms | 229.06 ms | 247.71 ms | 0.45x |
| fib_rec | 22.70 ms | 23.90 ms | 24.47 ms | 26.44 ms | 47.63 ms | 45.94 ms | 0.95x |
| net_echo | 365.60 ms | 377.22 ms | 372.74 ms | — | 370.72 ms | — | 0.97x |
| json_parse | 364.08 ms | 190.39 ms | 130.81 ms | 79.41 ms | 221.80 ms | 360.96 ms | 1.91x |
| sort_int | 548.03 ms | 322.96 ms | 236.12 ms | 328.80 ms | 349.67 ms | 2.04 s | 1.70x |
| alloc_churn | 1.02 s | 591.29 ms | 751.09 ms | 589.05 ms | 221.81 ms | 636.15 ms | 1.72x |
| match_dispatch | 113.00 ms | 46.41 ms | 27.08 ms | 28.25 ms | 117.61 ms | 106.87 ms | 2.43x |
| Geometric mean, 17 cases | KshanexLang vs C at -O2 | 1.08x | |||||
Minimum of 11 runs on one Windows 11 x86_64 machine. C at -O2; Rust, Zig, Swift, and Go at their documented optimisation levels. Ratios are against C. The checked default is measured; the unsafe opt-out is not the design. Full 17-case table and methodology: kshanexlang/docs/BENCHMARKS.md.