The Computer Language
Benchmarks Game

Python 3 programs versus Java

by benchmark task performance

pidigits
secs KB gz cpu cpu load
Python 3 2.20 10,300 335 2.20 1% 0% 1% 100%
Java 3.20 33,052 938 3.20 1% 1% 1% 100%
regex-dna
secs KB gz cpu cpu load
Python 3 24.05 317,412 424 24.04 1% 0% 1% 100%
Java 21.40 575,372 1284 21.39 1% 0% 1% 100%
reverse-complement
secs KB gz cpu cpu load
Python 3 4.47 264,580 800 4.45 0% 1% 1% 100%
Java 1.70 474,400 745 1.70 1% 1% 3% 99%
k-nucleotide
secs KB gz cpu cpu load
Python 3 284.38 153,732 1937 284.04 0% 1% 1% 100%
Java 34.83 1,124,104 1844 34.79 1% 1% 0% 100%
fasta
secs KB gz cpu cpu load
Python 3 110.68 8,148 977 110.64 1% 1% 1% 100%
Java 5.15 31,376 1507 5.14 1% 1% 0% 100%
fannkuch-redux
secs KB gz cpu cpu load
Python 3 2,132.93 56,676 944 2,132.33 1% 1% 1% 100%
Java 69.27 47,784 1282 69.25 1% 0% 0% 100%
n-body
secs KB gz cpu cpu load
Python 3 938.72 8,112 1228 938.49 0% 1% 1% 100%
Java 22.68 30,056 1424 22.67 0% 0% 1% 100%
mandelbrot
secs KB gz cpu cpu load
Python 3 1,072.06 55,872 686 1,071.62 0% 1% 1% 100%
Java 23.93 91,684 796 23.92 1% 1% 1% 100%
spectral-norm
secs KB gz cpu cpu load
Python 3 857.31 9,224 328 857.02 1% 1% 0% 100%
Java 16.22 32,332 950 16.22 0% 1% 1% 100%
binary-trees
secs KB gz cpu cpu load
Python 3 475.84 850,920 596 475.38 0% 1% 0% 100%
Java 7.39 414,024 583 7.38 1% 1% 1% 100%
fasta-redux
secs KB gz cpu cpu load
  No program contribute your program
Java 0.22 1,704 1443 0.20 5% 0% 0% 100%
Python 3

Python 3.5.0 (default, Sep 14 2015, 08:50:08) [GCC 4.9.2] on linux

Java

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)