The Computer Language
25.01 Benchmarks Game

Julia versus Classic Fortran fastest performance

How the programs are written matters! 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 seconds, less gz source code.

fannkuch-redux
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
* Julia #2 8.59 333,136 1077 31.99
* Julia #3 9.44 333,103 896 35.61—35.67
Classic Fortran 39.02 3,191 608 38.98—39.20
Classic Fortran #3 10.15 12,329 1164 40.49
Julia 42.56 309,703 441 42.61
n-body
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Julia #5 3.80 345,936 1129 3.85—3.95
Classic Fortran #6 4.22 2,146 1530 4.23
Classic Fortran #2 5.39 2,146 1507 5.39
Classic Fortran 5.45 2,142 1400 5.45
Classic Fortran #5 5.97 2,150 1669 6.00—6.09
Classic Fortran #4 6.18 2,146 1183 6.23
Classic Fortran #3 6.33 2,146 1311 6.36—6.40
Julia #4 7.17 415,039 1168 7.23
Julia #3 8.05 415,158 1548 8.10—8.14
Julia #2 28.79 415,015 1084 29.14—29.72
spectral-norm
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Classic Fortran #2 2.68 4,239 520 2.67
Classic Fortran #3 0.72 5,259 644 2.87—2.90
Julia #4 1.30 315,802 435 3.72
Julia #2 2.83 414,999 377 5.80—5.84
mandelbrot
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Julia #7 1.53 357,155 629 4.86
Julia #2 1.56 356,286 634 4.96
Julia #3 1.61 376,521 589 5.16—5.20
Julia #4 2.07 368,177 583 5.19
Classic Fortran #7 1.44 79,483 965 5.64
Julia #5 1.76 381,854 580 5.84
Julia #6 2.25 368,796 571 5.88
Classic Fortran #6 3.27 79,585 669 10.80
Julia 26.66 339,251 379 26.72
Classic Fortran #4 10.40 79,577 626 26.84—26.88
Classic Fortran #5 45.35 45,691 528 45.37—45.40
fasta
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Julia #2 1.28 317,960 1094 1.32
Classic Fortran #4 2.06 2,142 1355 2.06
Julia #5 2.67 334,729 957 2.72
Julia #4 2.73 320,463 1053 2.77
* Julia #7 1.98 405,914 1189 4.88—5.19
* Julia #6 2.25 391,623 1213 4.71—4.89
Classic Fortran #3 6.98 2,146 1217 7.06—7.15
Classic Fortran 7.19 2,142 1193 7.24—7.30
Julia #3 11.67 318,525 901 11.72—11.76
k-nucleotide
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Julia #6 6.82 524,403 965 14.32—14.68
Julia #7 9.91 576,082 1379 24.05—24.45
Julia 132.16 1,696,596 703 133.51—134.25
Classic Fortran   Empty  
reverse-complement
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Julia #7 1.75 1,128,034 531 1.83
Julia #9 2.08 1,330,057 456 2.17
Classic Fortran 4.24 1,012,376 1026 4.25
Julia #2 29.38 2,259,771 464 29.90—30.80
Classic Fortran #2 45.32 790,282 778 45.52—45.78
binary-trees
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
Classic Fortran #2 2.22 141,066 1155 6.99—7.03
Julia #2 12.60 552,776 430 13.52—14.54
Julia #4 14.42 551,617 378 15.81—15.87
Julia #3 7.34 569,876 640 19.64—21.02
Classic Fortran 32.31 540,062 780 32.36—32.47
Julia #5 22.15 1,392,615 396 60.98—61.97
pidigits
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
* Classic Fortran #4 0.74 5,399 987 0.74
* Julia #3 1.13 307,601 512 1.24
* Julia #2 1.24 315,621 686 1.31
Julia #4 3.76 414,806 531 3.86—3.91
regex-redux
  elapsed     Mean or 95% CI
source secs mem gz cpu secs
* Classic Fortran 0.98 179,618 2229 3.11—3.15
* Julia #5 1.91 519,856 766 3.18
* Julia #4 2.00 522,338 772 3.26—3.33
* Julia #3 2.18 671,347 630 3.58
Julia 5.19 714,330 414 5.26—5.35
Julia

julia version 1.11.1

Classic Fortran

Fortran Compiler Classic
2021.12.0 20240222