Benchmarks

Mac 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 16.880µs 14.000µs 34.000µs
2 D 19.228µs 14.700µs 59.900µs
3 C (Clang) 20.676µs 19.118µs 28.250µs
4 PHP 20.767µs 16.671µs 62.942µs
5 C (GCC) 21.516µs 18.139µs 39.220µs
6 Zig 37.720µs 34.000µs 64.000µs
7 Python 44.360µs 35.000µs 80.000µs
8 Rust 66.640µs 53.000µs 275.000µs
9 C++ (G++) 125.680µs 111.000µs 192.000µs
10 Kotlin (Native) 652.155µs 368.091µs 4,513.629µs
11 JavaScript (Node) 1,662.909µs 1,123.410µs 8,312.206µs
12 GraalVM 1,737.680µs 149.423µs 31,234.043µs
13 C++ (Clang++) 11,767.374µs 186.685µs 289,318.921µs
14 Ruby 40,985.720µs 460.000µs 1,010,114.000µs
15 JavaScript (Bun) 41,686.582µs 1,922.666µs 766,566.942µs
16 JavaScript (Deno) 53,877.058µs 1,338.907µs 1,290,119.507µs
17 Java 613,191.234µs 18,729.543µs 2,186,578.256µs
18 Kotlin (JVM) 1,293,784.837µs 44,259.637µs 2,493,818.201µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times