The Computer Language
Benchmarks Game

Clojure programs versus Python 3

by benchmark task performance

spectral-norm
source secs mem gz cpu cpu load
Clojure 5.23 63,380 918 18.38 85% 87% 86% 95%
Python 3 180.01 55,892 437 714.86 99% 100% 99% 100%
n-body
source secs mem gz cpu cpu load
Clojure 26.36 80,540 2162 27.52 2% 2% 97% 4%
Python 3 836.27 7,756 1181 836.06 0% 1% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
Clojure 8.94 156,448 1195 31.73 88% 88% 89% 91%
Python 3 250.62 52,752 686 1,000.26 100% 100% 100% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Clojure 19.84 72,936 1491 76.27 99% 96% 95% 95%
Python 3 501.72 54,708 944 1,967.92 98% 97% 100% 99%
fasta
source secs mem gz cpu cpu load
Clojure 6.49 71,088 1653 7.80 13% 88% 9% 13%
Python 3 113.03 7,860 977 112.99 1% 100% 0% 1%
binary-trees
source secs mem gz cpu cpu load
Clojure 13.81 615,132 750 45.65 85% 83% 88% 76%
Python 3 126.07 831,740 596 474.55 93% 93% 93% 99%
k-nucleotide
source secs mem gz cpu cpu load
Clojure 30.42 1,012,240 3030 98.48 84% 88% 76% 77%
Python 3 72.35 229,040 1937 268.72 98% 94% 91% 94%
reverse-complement
source secs mem gz cpu cpu load
Clojure 2.65 579,024 727 4.05 55% 20% 58% 23%
Python 3 2.93 265,636 800 4.28 80% 46% 21% 2%
pidigits
source secs mem gz cpu cpu load
Clojure 5.43 409,644 1794 8.02 16% 37% 26% 71%
Python 3 3.41 9,992 382 3.40 1% 2% 100% 1%
regex-redux
source secs mem gz cpu cpu load
Clojure 25.10 933,524 719 45.68 55% 58% 24% 47%
Python 3 14.87 433,868 486 28.02 32% 45% 84% 29%
Clojure

Clojure 1.8.0

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Python 3

Python 3.6.0 (default, Feb 5 2017, 10:29:14) [GCC 5.4.0 20160609] on linux
--enable-optimizations
make profile-opt