Benchmarks

Windows 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 22.656µs 0.000µs 566.400µs
2 PHP 33.700µs 25.800µs 117.700µs
3 C (Clang) 34.812µs 31.400µs 42.400µs
4 C (GCC) 43.844µs 38.600µs 68.000µs
5 Zig 56.676µs 25.100µs 591.300µs
6 D 86.800µs 77.700µs 127.900µs
7 Python 88.684µs 67.100µs 198.700µs
8 Rust 100.116µs 86.900µs 144.300µs
9 GraalVM 230.352µs 136.900µs 2,057.900µs
10 C++ (G++) 354.320µs 256.100µs 1,596.200µs
11 C++ (Clang++) 2,188.308µs 1,010.000µs 14,543.700µs
12 JavaScript (Deno) 3,330.216µs 2,006.900µs 11,291.900µs
13 Ruby 5,201.640µs 3,358.800µs 11,151.800µs
14 JavaScript (Node) 9,437.104µs 2,169.600µs 47,509.900µs
15 Kotlin (Native) 38,610.664µs 9,119.000µs 127,393.000µs
16 JavaScript (Bun) 102,463.564µs 3,594.900µs 233,389.000µs
17 Kotlin (JVM) 278,485.168µs 102,913.900µs 1,024,720.800µs
18 Java 299,033.216µs 92,090.100µs 832,208.300µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times