Benchmark results
Generated by python3 bench/run.py. Times are milliseconds (median of 5 runs, lower is better). Each case runs in its own process, warmed up once before the timed run, so start-up time is not included. Every language computes the same checksum for every case.
Environment
| |
|
| Date |
2026-12-01 |
| CPU |
Intel(R) Core(TM) 7 240H (16 threads) |
| OS |
Linux-7.0.0-44-generic-x86_64-with-glibc2.39 |
| Korr |
korr 0.13.1 (Emerald) |
| PHP |
PHP 8.4.28 (cli) (built: Nov 19 2026 20:03:32) (NTS) |
| Node.js |
v24.22.3 |
| Python |
Python 3.12.3 |
Summary
Geometric mean of the time ratio language / Korr per category. Above 1.00x means Korr is faster, below 1.00x means Korr is slower.
| Category |
Cases |
PHP |
Node.js |
Python |
| Core language |
4 |
0.60x |
0.08x |
1.87x |
| Collections |
6 |
0.72x |
1.37x |
1.71x |
| Strings |
4 |
0.75x |
1.21x |
1.22x |
| Structs and objects |
2 |
0.59x |
0.05x |
1.41x |
| Classic algorithms |
4 |
0.45x |
0.07x |
1.03x |
| Standard library |
3 |
0.52x |
0.99x |
1.86x |
| All cases |
23 |
0.61x |
0.35x |
1.49x |
Cases where Korr is as fast or faster: 1 of 23 against PHP, 8 of 23 against Node.js, 18 of 23 against Python.
Core language
| Case |
Korr |
PHP |
Node.js |
Python |
Fastest |
loop_int |
41.0 |
39.9 |
5.31 |
245 |
Node.js |
loop_float |
17.6 |
13.6 |
1.07 |
53.3 |
Node.js |
fib_recursive |
22.7 |
7.20 |
1.48 |
15.3 |
Node.js |
closures |
37.8 |
19.9 |
2.72 |
38.0 |
Node.js |
Collections
| Case |
Korr |
PHP |
Node.js |
Python |
Fastest |
array_push |
27.2 |
14.1 |
16.8 |
27.2 |
PHP |
array_index |
14.3 |
11.9 |
31.0 |
48.4 |
PHP |
array_iterate |
14.7 |
9.76 |
37.8 |
37.2 |
PHP |
array_sort |
21.7 |
36.0 |
59.6 |
56.9 |
Korr |
map_filter_reduce |
34.9 |
20.7 |
16.7 |
27.5 |
Node.js |
map_string_keys |
43.1 |
20.4 |
62.8 |
61.0 |
PHP |
Strings
| Case |
Korr |
PHP |
Node.js |
Python |
Fastest |
interpolate_join |
15.5 |
9.18 |
17.0 |
19.7 |
PHP |
concat |
18.5 |
11.2 |
8.53 |
25.6 |
Node.js |
split_join |
24.0 |
23.3 |
60.2 |
25.8 |
PHP |
search_replace |
10.3 |
9.57 |
17.6 |
12.0 |
PHP |
Structs and objects
| Case |
Korr |
PHP |
Node.js |
Python |
Fastest |
struct_method |
47.3 |
22.4 |
2.55 |
56.9 |
Node.js |
field_update |
23.6 |
17.5 |
1.29 |
39.0 |
Node.js |
Classic algorithms
| Case |
Korr |
PHP |
Node.js |
Python |
Fastest |
nbody |
150 |
77.3 |
3.25 |
153 |
Node.js |
binary_trees |
23.8 |
6.39 |
3.07 |
18.5 |
Node.js |
sieve |
123 |
82.9 |
21.7 |
125 |
Node.js |
spectral_norm |
29.2 |
13.3 |
1.41 |
41.0 |
Node.js |
Standard library
| Case |
Korr |
PHP |
Node.js |
Python |
Fastest |
json |
15.1 |
13.2 |
13.2 |
28.0 |
Node.js |
regex |
10.1 |
9.02 |
42.3 |
115 |
PHP |
sha256 |
68.8 |
12.5 |
18.2 |
21.0 |
PHP |
Start-up
A process that prints one line, median of 20 runs, including process creation.
| |
Korr |
PHP |
Node.js |
Python |
| Time (ms) |
4.60 |
29.5 |
33.3 |
28.1 |
| Peak memory (MiB) |
14.2 |
16.0 |
41.7 |
14.2 |
Peak memory per case
Maximum resident set size of the process that ran the case (MiB), including the runtime itself.
| Case |
Korr |
PHP |
Node.js |
Python |
loop_int |
15.1 |
17.0 |
53.4 |
15.6 |
loop_float |
15.0 |
17.0 |
52.8 |
15.6 |
fib_recursive |
14.8 |
16.9 |
51.4 |
15.6 |
closures |
15.0 |
16.9 |
51.7 |
15.5 |
array_push |
52.6 |
34.2 |
87.6 |
54.0 |
array_index |
30.9 |
32.1 |
68.7 |
53.9 |
array_iterate |
31.0 |
31.9 |
75.8 |
53.8 |
array_sort |
39.1 |
30.4 |
75.0 |
25.7 |
map_filter_reduce |
46.8 |
32.1 |
64.8 |
27.2 |
map_string_keys |
37.1 |
32.2 |
99.3 |
45.5 |
interpolate_join |
44.9 |
33.2 |
94.6 |
31.7 |
concat |
22.8 |
18.3 |
114.1 |
16.7 |
split_join |
59.0 |
29.0 |
109.6 |
25.5 |
search_replace |
21.0 |
18.0 |
63.6 |
16.6 |
struct_method |
14.8 |
17.0 |
54.0 |
15.6 |
field_update |
14.9 |
16.9 |
51.2 |
15.6 |
nbody |
14.8 |
17.0 |
54.4 |
15.7 |
binary_trees |
18.9 |
20.6 |
62.6 |
18.1 |
sieve |
87.0 |
47.2 |
68.7 |
30.9 |
spectral_norm |
14.7 |
17.0 |
54.6 |
15.7 |
json |
41.0 |
42.7 |
66.5 |
32.7 |
regex |
23.1 |
17.1 |
54.9 |
16.6 |
sha256 |
18.8 |
17.8 |
51.4 |
17.6 |
| Geometric mean |
25.8 |
23.4 |
66.4 |
23.0 |
Checksums
All languages agree on every case:
| Case |
Checksum |
loop_int |
49999995000000 |
loop_float |
999999500000.0 |
fib_recursive |
196418 |
closures |
1000000 |
array_push |
1000000 |
array_index |
499999500000 |
array_iterate |
499999500000 |
array_sort |
1074316825 |
map_filter_reduce |
29999700000 |
map_string_keys |
19999900000 |
interpolate_join |
2288889 |
concat |
1000000 |
split_join |
5005000 |
search_replace |
20800000 |
struct_method |
1199997 |
field_update |
3000000 |
nbody |
-0.169078071 |
binary_trees |
131068 |
sieve |
148933 |
spectral_norm |
1.274219991 |
json |
39999 |
regex |
130000 |
sha256 |
f3cffaf6a219 |
What the cases do
The programs are in bench/workloads/ and are written the way each language is normally written (PHP foreach and .=, JavaScript Map and for...of, Python list appends, Korr pipelines), not as literal translations.
| Case |
Work |
loop_int |
sum of 0 .. 10,000,000 with an integer counter |
loop_float |
2,000,000 float multiply-adds |
fib_recursive |
naive recursive fib(27): function call overhead |
closures |
a counter closure called 1,000,000 times |
array_push |
append 1,000,000 integers |
array_index |
indexed loop over 1,000,000 elements |
array_iterate |
for over 1,000,000 elements |
array_sort |
sort 200,000 pseudo-random integers (MINSTD generator) |
map_filter_reduce |
map, filter and reduce over 300,000 elements |
map_string_keys |
200,000 inserts and lookups with string keys |
interpolate_join |
200,000 interpolated strings joined with , |
concat |
grow a string one character at a time, 1,000,000 times |
split_join |
split a 1 MB text on spaces and join it again, 5 times |
search_replace |
count and replace words in a 1 MB text, 20 times |
struct_method |
create 300,000 structs and call a method on each |
field_update |
2,000,000 field updates on one struct |
nbody |
n-body simulation, 5 bodies, 50,000 steps |
binary_trees |
build and walk 4 binary trees of depth 14 (allocation) |
sieve |
sieve of Eratosthenes up to 2,000,000 |
spectral_norm |
spectral norm, n = 100 |
json |
encode and decode 20,000 records |
regex |
find 13,000 e-mail addresses in a 1 MB text, 10 times |
sha256 |
20 chained SHA-256 hashes of a 1 MB text |