The Computer Language
22.05 Benchmarks Game

Fastest cpu secs Racket versus Python 3

Always look at the source code.

If the fastest programs are hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more cpu seconds, less gz source code.

fannkuch-redux
source mem gz cpu
Racket #2 66,616 908 111.70
Racket #3 68,148 1101 120.34
Racket 66,312 649 143.11
Python 3 #6 7,432 385 1,279.15
Python 3 #4 45,420 950 1,336.72
n-body
source mem gz cpu
Racket #2 68,496 1689 14.09
Racket 68,936 1496 40.83
Python 3 7,756 1196 575.02
Python 3 #2 8,244 1242 592.71
spectral-norm
source mem gz cpu
Racket #3 65,100 627 14.71
Racket #2 65,336 532 14.99
Racket 66,852 446 29.47
Python 3 #6 9,332 328 436.79
Python 3 #8 48,336 407 472.82
Python 3 #7 48,400 417 494.32
mandelbrot
source mem gz cpu
Racket #3 65,448 802 34.63
Racket #4 103,948 801 41.19
Racket 66,768 517 49.23
Racket #2 65,576 585 51.16
Python 3 #7 46,192 688 706.10
Python 3 #5   Failed  
Python 3 #2   Timed Out  
pidigits
source mem gz cpu
Racket #2 67,012 1136 1.02
Python 3 #3 11,968 567 1.13
Python 3 #4 8,668 342 4.06
Racket 71,068 453 12.25
Python 3 #2   Bad Output  
regex-redux
source mem gz cpu
Python 3 #2 111,680 1403 2.66
Python 3 458,264 512 17.86
Racket 2,074,452 541 21.84
Racket #2 2,003,760 729 22.58
fasta
source mem gz cpu
Racket #3 66,908 1280 7.99
Racket 66,768 1066 18.91
Python 3 #2 8,184 1121 60.26
Python 3 #3 8,112 1003 60.50
Python 3 8,040 817 70.54
Python 3 #5 837,684 1947 71.74
k-nucleotide
source mem gz cpu
Racket #4 988,500 885 63.58
Python 3 #3 252,668 1967 172.53
Racket 2,614,596 547 199.02
Python 3 351,092 607 240.16
Python 3 #8 473,988 655 242.16
reverse-complement
source mem gz cpu
Racket #2 687,976 1030 8.74
Python 3 #2 1,786,488 434 9.38
Python 3 1,979,276 479 9.63
Python 3 #6 1,005,184 814 10.64
Python 3 #4 4,001,684 335 12.31
Racket 2,575,076 553 39.70
binary-trees
source mem gz cpu
Racket #3 299,864 473 6.42
Racket #4 545,328 853 8.90
Racket #2 308,092 416 8.95
Racket 435,536 476 15.25
Python 3 #2 270,872 338 148.09
Python 3 #5 273,284 660 172.44
Python 3 #4 456,220 472 176.37
Python 3 282,996 589 178.66
Python 3 #3 669,832 1238 230.73
Racket

Racket v8.5 [cs].

Python 3

Python 3.10.4