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 0.000µs 0.000µs 0.000µs
2 PHP 34.824µs 24.500µs 154.400µs
3 C (Clang) 39.824µs 31.800µs 98.700µs
4 Zig 68.292µs 22.600µs 1,048.000µs
5 Python 78.324µs 65.200µs 115.200µs
6 C (GCC) 91.936µs 38.100µs 1,188.600µs
7 Rust 108.132µs 89.500µs 253.200µs
8 D 108.584µs 76.400µs 547.100µs
9 GraalVM 207.384µs 137.700µs 1,432.200µs
10 C++ (G++) 631.200µs 238.300µs 9,028.100µs
11 C++ (Clang++) 1,895.228µs 1,017.600µs 12,085.200µs
12 JavaScript (Deno) 3,815.964µs 2,065.600µs 13,542.300µs
13 JavaScript (Node) 12,267.692µs 2,079.500µs 55,480.500µs
14 Ruby 20,039.992µs 3,193.500µs 404,604.000µs
15 Kotlin (Native) 51,876.436µs 9,939.200µs 215,904.000µs
16 JavaScript (Bun) 91,254.616µs 13,231.300µs 215,694.100µs
17 Kotlin (JVM) 211,795.684µs 105,815.300µs 709,076.700µs
18 Java 250,366.552µs 78,789.000µs 971,864.400µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times