Benchmarks

Mac 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.324µs 0.306µs 0.375µs
2 Go 1.880µs 1.000µs 3.000µs
3 Kotlin (Native) 2.095µs 1.956µs 3.120µs
4 C (Clang) 5.524µs 5.400µs 5.697µs
5 C++ (Clang++) 5.570µs 5.409µs 5.849µs
6 Zig 6.360µs 6.000µs 7.000µs
7 Rust 8.000µs 7.000µs 9.000µs
8 C (GCC) 8.539µs 8.325µs 8.957µs
9 C++ (G++) 9.160µs 9.000µs 10.000µs
10 Java 28.896µs 27.242µs 35.662µs
11 JavaScript (Node) 49.182µs 47.104µs 56.268µs
12 PHP 68.913µs 67.028µs 73.780µs
13 Ruby 128.520µs 108.000µs 464.000µs
14 Python 165.680µs 149.000µs 380.000µs
15 Kotlin (JVM) 1,005.252µs 466.597µs 6,094.289µs
16 JavaScript (Bun) 27,803.386µs 124.540µs 641,791.819µs
17 JavaScript (Deno) 35,740.115µs 69.565µs 891,232.437µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times