Each chart bar shows how many times slower, one ↓ thread-ring program was, compared to the fastest program.
These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.
Column × shows how many times more each program used compared to the benchmark program that used least.
sort | sort | sort | ||||
× | Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
---|---|---|---|---|---|---|
1.0 | PyPy 2 | 0.11 | 0.11 | ? | 407 | 0% 8% 92% 0% 9% 0% 0% 8% |
2.1 | Cython | 0.23 | 0.23 | 3,120 | 419 | 4% 0% 100% 0% 0% 0% 4% 4% |
2.3 | PyPy 3 | 0.13 | 0.26 | 128 | 406 | 22% 15% 50% 38% 8% 8% 4% 4% |
2.5 | Python development version | 0.24 | 0.28 | 384 | 406 | 10% 10% 7% 93% 4% 0% 0% 0% |
2.5 | Python 3 | 0.28 | 0.28 | 1,920 | 406 | 100% 7% 0% 0% 4% 0% 0% 3% |
3.1 | Nuitka | 0.35 | 0.35 | 1,152 | 406 | 17% 3% 3% 0% 100% 14% 16% 9% |
3.4 | Python 2 | 0.38 | 0.39 | 2,800 | 407 | 3% 3% 97% 0% 0% 0% 0% 0% |
24 | Jython | 5.84 | 2.66 | 3,476 | 407 | 54% 23% 34% 24% 32% 24% 15% 20% |
46 | RustPython | 5.16 | 5.20 | 15,540 | 406 | 97% 4% 2% 1% 6% 3% 3% 3% |
299 | MicroPython #2 | 15.41 | 33.76 | 4,480 | 448 | 6% 5% 6% 5% 5% 4% 6% 4% |
316 | Python 3 #2 | 36.21 | 35.66 | 16,784 | 448 | 8% 9% 12% 10% 14% 15% 10% 7% |
317 | Nuitka #2 | 17.64 | 35.87 | 15,872 | 448 | 9% 7% 5% 4% 5% 5% 6% 9% |
320 | Python development version #2 | 36.27 | 36.17 | 13,476 | 448 | 15% 13% 8% 18% 9% 10% 8% 9% |
329 | PyPy 3 #2 | 28.61 | 37.17 | 73,036 | 448 | 19% 7% 4% 3% 12% 24% 5% 15% |
386 | Pyston #2 | 23.20 | 43.66 | 10,748 | 448 | 17% 10% 7% 5% 7% 6% 7% 7% |
482 | RustPython #2 | 43.44 | 54.49 | 17,884 | 448 | 16% 14% 14% 17% 8% 10% 8% 6% |
missing benchmark programs | ||||||
IronPython | No program | |||||
Shedskin | No program | |||||
Numba | No program | |||||
Grumpy | No program | |||||
Graal | No program |
diff program output N = 1000 with this output file to check your program is correct before contributing.
Each program should create and keep alive 503 pre-emptive threads, explicity or implicitly linked in a ring, and pass a token between one thread and the next thread at least N times.
We are trying to show the performance of various programming language implementations - so we ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.
Each program should
Similar benchmarks are described in Performance Measurements of Threads in Java and Processes in Erlang, 1998; and A Benchmark Test for BCPL Style Coroutines, 2004. (Note: 'Benchmarks that may seem to be concurrent are often sequential. The estone benchmark, for instance, is entirely sequential. So is also the most common implementation of the "ring benchmark'; usually one process is active, while the others wait in a receive statement.') For some language implementations increasing the number of threads quickly results in Death by Concurrency.
Programs may use pre-emptive kernel threads or pre-emptive lightweight threads; but programs that use non pre-emptive threads (coroutines, cooperative threads) and any programs that use custom schedulers, will be listed as interesting alternative implementations. Briefly say what concurrency technique is used in the program header comment.