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.280µs 13.000µs 45.000µs
2 C (GCC) 19.713µs 19.223µs 20.435µs
3 C (Clang) 20.910µs 20.181µs 23.774µs
4 PHP 28.249µs 18.703µs 226.807µs
5 Zig 36.240µs 35.000µs 38.000µs
6 Python 42.200µs 39.000µs 61.000µs
7 Rust 64.240µs 63.000µs 66.000µs
8 C++ (G++) 120.800µs 116.000µs 131.000µs
9 C++ (Clang++) 201.590µs 196.552µs 218.919µs
10 GraalVM 283.879µs 158.494µs 1,861.165µs
11 Kotlin (Native) 544.874µs 400.564µs 1,938.413µs
12 Ruby 717.280µs 484.000µs 4,133.000µs
13 JavaScript (Deno) 2,113.899µs 1,396.963µs 6,594.805µs
14 JavaScript (Node) 36,355.366µs 1,140.193µs 877,719.117µs
15 JavaScript (Bun) 54,713.836µs 2,038.380µs 638,849.572µs
16 Java 227,280.664µs 19,877.157µs 1,194,642.574µs
17 Kotlin (JVM) 1,260,985.412µs 49,351.057µs 2,362,204.839µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times