Benchmarks

Linux Benchmark: sqrt(x) (1K)

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

number math 1K

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 GraalVM 0.780µs 0.661µs 0.962µs
2 Go 3.960µs 3.587µs 4.297µs
3 C (Clang) 5.290µs 4.719µs 6.252µs
4 C (GCC) 5.444µs 4.759µs 6.021µs
5 Zig 6.203µs 5.851µs 6.462µs
6 C++ (G++) 6.501µs 6.062µs 7.074µs
7 C++ (Clang++) 8.761µs 8.135µs 9.608µs
8 Kotlin (Native) 9.871µs 8.927µs 11.392µs
9 Rust 11.344µs 9.698µs 29.837µs
10 JavaScript (Deno) 103.973µs 89.419µs 124.677µs
11 JavaScript (Bun) 377.134µs 333.893µs 429.857µs
12 JavaScript (Node) 1,344.867µs 74.902µs 30,556.397µs
13 Java 2,625.718µs 35.007µs 59,331.213µs
14 Ruby 7,478.554µs 128.254µs 84,306.176µs
15 Python 9,422.527µs 156.917µs 97,220.338µs
16 PHP 11,048.374µs 416.040µs 61,482.457µs
17 Kotlin (JVM) 13,847.663µs 533.102µs 78,975.733µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times