Benchmarks

Linux Benchmark: SHA-1 Hashing (x25)

Secure Hash Algorithm 1 (SHA-1) is a widely used cryptographic hash function that produces a 160-bit (20-byte) hash value. It is commonly used to verify the integrity of data. This benchmark measures the time taken to hash 25 strings using the SHA1 algorithm.

string encryption

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 Go 15.751µs 14.207µs 17.643µs
2 D 19.784µs 16.700µs 23.100µs
3 PHP 32.944µs 26.851µs 57.147µs
4 C (GCC) 40.912µs 35.617µs 59.080µs
5 C (Clang) 43.984µs 39.655µs 64.712µs
6 Zig 59.507µs 53.641µs 79.379µs
7 GraalVM 129.473µs 117.791µs 153.108µs
8 Rust 1,697.809µs 46.798µs 27,511.340µs
9 Ruby 2,111.988µs 367.470µs 40,220.050µs
10 Kotlin (Native) 2,191.202µs 876.956µs 19,242.826µs
11 Python 4,175.374µs 40.005µs 58,284.971µs
12 C++ (G++) 4,500.773µs 137.007µs 55,027.074µs
13 C++ (Clang++) 6,268.074µs 149.040µs 76,039.083µs
14 JavaScript (Deno) 41,708.560µs 2,037.294µs 75,599.104µs
15 JavaScript (Node) 44,036.481µs 1,688.021µs 87,868.280µs
16 JavaScript (Bun) 72,832.322µs 31,473.759µs 151,719.579µs
17 Java 509,465.047µs 80,873.323µs 789,017.791µs
18 Kotlin (JVM) 1,554,556.844µs 1,216,279.406µs 1,896,019.532µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times