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 Zig 27.688µs 26.100µs 30.000µs
2 PHP 28.576µs 26.700µs 32.100µs
3 C (GCC) 47.632µs 38.900µs 126.400µs
4 Python 68.216µs 51.000µs 137.000µs
5 Go 79.804µs 0.000µs 999.200µs
6 GraalVM 166.516µs 147.600µs 234.700µs
7 C (Clang) 176.316µs 32.700µs 1,998.200µs
8 Rust 412.992µs 88.700µs 7,052.800µs
9 C++ (G++) 588.016µs 260.100µs 3,591.100µs
10 C++ (Clang++) 1,580.068µs 1,013.800µs 5,006.100µs
11 JavaScript (Deno) 6,295.088µs 2,095.200µs 48,983.500µs
12 JavaScript (Node) 12,054.496µs 2,233.400µs 120,513.900µs
13 Ruby 14,454.156µs 4,508.400µs 156,283.300µs
14 Kotlin (Native) 39,786.160µs 8,691.700µs 88,789.400µs
15 JavaScript (Bun) 99,520.036µs 33,832.400µs 251,424.700µs
16 Java 226,383.472µs 52,256.000µs 521,234.600µs
17 Kotlin (JVM) 460,435.152µs 101,316.700µs 3,301,757.300µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times