Benchmarks

Windows Benchmark: Is Prime (100K)

Performs a primality test on all numbers between 1 and 100,000.

math number 100K

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 C (Clang) 8,825.096µs 6,948.900µs 20,266.900µs
2 C (GCC) 10,407.116µs 6,863.600µs 23,733.100µs
3 C++ (G++) 10,918.648µs 7,326.100µs 17,308.700µs
4 GraalVM 10,997.404µs 7,770.500µs 22,178.700µs
5 C++ (Clang++) 12,108.640µs 6,988.800µs 29,055.100µs
6 Rust 20,312.024µs 15,947.300µs 41,382.300µs
7 JavaScript (Deno) 24,129.640µs 11,125.600µs 135,287.600µs
8 Kotlin (Native) 30,801.108µs 19,842.700µs 56,099.300µs
9 JavaScript (Node) 54,960.004µs 23,047.200µs 107,135.200µs
10 Kotlin (JVM) 73,551.368µs 11,892.900µs 290,057.900µs
11 D 82,907.084µs 41,981.700µs 197,630.500µs
12 Java 94,338.552µs 13,398.500µs 211,676.300µs
13 Go 106,723.492µs 12,985.500µs 315,815.200µs
14 PHP 190,423.416µs 100,620.100µs 318,052.900µs
15 JavaScript (Bun) 281,197.036µs 124,577.400µs 501,224.000µs
16 Zig 376,475.632µs 226,124.800µs 541,616.900µs
17 Ruby 523,976.296µs 337,607.400µs 1,608,595.600µs
18 Python 34,984,172.800µs 15,567,436.400µs 73,813,181.000µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times