Benchmarks

Linux Benchmark: SHA-256 Hashing (x25)

Secure Hash Algorithm 2 (SHA-2) is a family of widely used cryptographic hash functions. SHA-256, its most popular variant, produces a 256-bit (32-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 SHA-256 algorithm.

string encryption

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 Go 15.179µs 13.856µs 17.052µs
2 Zig 19.987µs 19.135µs 21.941µs
3 C (GCC) 22.987µs 20.868µs 25.558µs
4 C (Clang) 24.306µs 21.561µs 28.583µs
5 PHP 34.905µs 31.048µs 38.562µs
6 Rust 70.905µs 64.250µs 92.264µs
7 Python 1,891.150µs 35.927µs 46,315.247µs
8 GraalVM 2,494.882µs 105.679µs 59,622.355µs
9 Kotlin (Native) 2,615.421µs 833.224µs 17,150.720µs
10 D 5,449.968µs 65.900µs 54,186.600µs
11 C++ (G++) 9,941.454µs 195.878µs 67,268.096µs
12 C++ (Clang++) 12,641.796µs 251.061µs 63,864.275µs
13 Ruby 18,692.344µs 762.962µs 60,918.541µs
14 JavaScript (Node) 55,011.789µs 2,097.700µs 112,515.570µs
15 JavaScript (Deno) 56,469.944µs 39,425.380µs 78,308.793µs
16 JavaScript (Bun) 65,044.637µs 29,031.292µs 131,940.316µs
17 Java 505,102.024µs 80,356.033µs 704,240.855µs
18 Kotlin (JVM) 1,566,781.583µs 1,209,232.854µs 2,007,778.708µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times