The Computer Language
Benchmarks Game

F# .NET versus Java fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

regex-redux
source secs mem gz busy cpu load
F# .NET 2.85 1,301,192 611 7.36 51% 92% 59% 56%
Java 5.70 656,328 929 18.25 89% 76% 79% 75%
k-nucleotide
source secs mem gz busy cpu load
F# .NET 3.65 184,680 1907 12.58 94% 84% 85% 83%
Java 5.00 408,040 1812 16.36 74% 81% 86% 86%
fannkuch-redux
source secs mem gz busy cpu load
F# .NET 8.65 31,784 1097 33.57 98% 99% 94% 98%
Java 11.00 34,104 1282 43.42 99% 98% 98% 99%
mandelbrot
source secs mem gz busy cpu load
F# .NET 3.77 64,912 933 14.73 99% 97% 98% 97%
Java 4.11 68,204 796 16.20 98% 99% 98% 99%
spectral-norm
source secs mem gz busy cpu load
F# .NET 1.55 31,916 853 5.83 92% 98% 93% 93%
Java 1.68 38,348 950 6.43 96% 96% 96% 95%
fasta
source secs mem gz busy cpu load
F# .NET 1.14 120,528 1350 4.18 94% 94% 89% 91%
Java 1.20 44,124 2543 3.61 79% 86% 69% 65%
reverse-complement
source secs mem gz busy cpu load
F# .NET 1.51 1,030,852 1140 4.19 93% 36% 58% 91%
Java 1.54 702,332 2183 3.55 78% 46% 49% 57%
n-body
source secs mem gz busy cpu load
F# .NET 6.88 34,744 1617 6.92 0% 100% 1% 0%
Java 6.75 35,200 1489 6.83 0% 0% 100% 1%
pidigits
source secs mem gz busy cpu load
F# .NET 0.82 34,428 905 0.83 1% 2% 96% 1%
Java 0.79 35,568 764 0.84 99% 3% 3% 1%
binary-trees
source secs mem gz busy cpu load
F# .NET 2.73 719,880 635 9.33 80% 89% 87% 85%
Java 2.50 2,487,096 835 7.90 88% 75% 75% 79%
F# .NET

.NET SDK 5.0.100
Host Version: 5.0.0; Commit: cf258a14b7
<ServerGarbageCollection>true

Java

openjdk 15 2020-09-15
OpenJDK Runtime Environment (build 15+36-1562)
OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)