Benchmarks

Mac Benchmark: sqrt(x) (100K)

Benchmark the performance of the sqrt function, between 1 and 100,000.

number math 100K

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 GraalVM 31.746µs 24.500µs 184.255µs
2 Go 173.480µs 159.000µs 236.000µs
3 Kotlin (Native) 193.095µs 175.661µs 278.161µs
4 C (Clang) 565.790µs 537.847µs 769.304µs
5 C++ (Clang++) 571.154µs 537.861µs 837.926µs
6 Zig 627.080µs 595.000µs 832.000µs
7 C (GCC) 763.250µs 639.646µs 855.249µs
8 C++ (G++) 885.800µs 865.000µs 937.000µs
9 Java 4,277.441µs 2,190.196µs 34,124.070µs
10 Rust 17,419.000µs 755.000µs 416,315.000µs
11 JavaScript (Bun) 32,303.352µs 1,603.025µs 580,737.478µs
12 Ruby 52,883.800µs 10,247.000µs 1,025,192.000µs
13 PHP 65,017.659µs 5,711.320µs 928,184.070µs
14 JavaScript (Deno) 70,931.360µs 2,416.459µs 896,090.407µs
15 Python 117,131.040µs 15,803.000µs 910,402.000µs
16 Kotlin (JVM) 153,000.752µs 2,768.406µs 1,142,449.643µs
17 JavaScript (Node) 184,888.468µs 2,215.064µs 901,679.344µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times