Benchmarks

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 Go 2.000µs 1.000µs 3.000µs
2 Kotlin (Native) 2.599µs 2.323µs 2.716µs
3 C (Clang) 5.824µs 5.677µs 6.325µs
4 C++ (Clang++) 6.227µs 5.691µs 15.734µs
5 C (GCC) 8.672µs 7.933µs 9.933µs
6 C++ (G++) 9.600µs 9.000µs 11.000µs
7 Rust 11.240µs 8.000µs 80.000µs
8 Java 32.571µs 28.136µs 89.133µs
9 JavaScript (Node) 62.862µs 52.302µs 267.651µs
10 JavaScript (Deno) 74.309µs 67.134µs 93.154µs
11 PHP 79.676µs 74.490µs 102.183µs
12 Python 207.320µs 156.000µs 752.000µs
13 Ruby 210.160µs 113.000µs 2,386.000µs
14 Kotlin (JVM) 735.459µs 442.948µs 1,906.995µs
15 JavaScript (Bun) 1,446.621µs 131.642µs 13,838.003µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times