The Computer Language
Benchmarks Game

Python 3 programs versus Java

by benchmark task performance

pidigits
secs KB gz cpu cpu load
Python 3 2.74 8,468 335 2.73 0% 1% 1% 100%
Java 4.14 26,616 938 4.14 2% 0% 1% 100%
regex-dna
secs KB gz cpu cpu load
Python 3 25.11 249,088 478 24.98 1% 0% 1% 100%
Java 20.80 567,404 1284 20.79 0% 0% 1% 100%
reverse-complement
secs KB gz cpu cpu load
Python 3 5.54 262,360 800 5.53 1% 1% 1% 100%
Java 1.80 522,620 745 1.80 3% 1% 1% 99%
k-nucleotide
secs KB gz cpu cpu load
Python 3 317.42 219,028 1937 317.16 0% 1% 1% 100%
Java 33.48 1,190,032 1844 33.44 1% 1% 0% 100%
fasta
secs KB gz cpu cpu load
Python 3 122.25 6,508 977 122.19 1% 1% 1% 100%
Java 4.81 24,836 1507 4.80 1% 1% 0% 100%
fannkuch-redux
secs KB gz cpu cpu load
Python 3 2,464.08 44,564 944 2,463.20 1% 0% 0% 100%
Java 67.66 26,644 1282 67.63 1% 1% 0% 100%
n-body
secs KB gz cpu cpu load
Python 3 1,024.87 6,324 1228 1,024.54 1% 0% 1% 100%
Java 24.33 24,036 1424 24.32 1% 0% 0% 100%
mandelbrot
secs KB gz cpu cpu load
Python 3 1,209.01 40,500 686 1,208.52 1% 0% 1% 100%
Java 27.19 88,448 796 27.18 1% 0% 1% 100%
binary-trees
secs KB gz cpu cpu load
Python 3 497.80 482,656 596 497.40 1% 1% 1% 100%
Java 10.70 518,220 926 10.68 1% 1% 0% 100%
spectral-norm
secs KB gz cpu cpu load
Python 3 1,105.41 7,120 328 1,105.02 1% 0% 0% 100%
Java 16.37 26,876 950 16.36 1% 1% 0% 100%
fasta-redux
secs KB gz cpu cpu load
  No program contribute your program
Java 0.22 476 1443 0.21 0% 5% 0% 100%
Python 3

Python 3.5.0 (default, Sep 14 2015, 09:36:50) [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) Server VM (build 25.45-b02, mixed mode)