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.271µs 13.746µs 20.138µs
2 C (GCC) 24.647µs 20.679µs 40.046µs
3 PHP 37.923µs 28.474µs 56.938µs
4 Zig 71.121µs 18.956µs 1,292.802µs
5 GraalVM 130.896µs 114.488µs 153.321µs
6 C (Clang) 1,333.411µs 22.463µs 32,716.158µs
7 Rust 2,103.498µs 66.567µs 50,716.153µs
8 Python 2,762.225µs 36.890µs 68,016.490µs
9 Kotlin (Native) 8,543.248µs 837.287µs 78,631.105µs
10 Ruby 8,871.046µs 766.257µs 72,677.029µs
11 C++ (G++) 9,781.245µs 215.057µs 68,659.056µs
12 C++ (Clang++) 21,779.964µs 255.636µs 87,149.794µs
13 JavaScript (Node) 52,729.375µs 2,381.286µs 105,309.032µs
14 JavaScript (Deno) 55,263.418µs 2,302.459µs 90,614.081µs
15 JavaScript (Bun) 71,044.911µs 35,581.375µs 145,989.212µs
16 Java 537,952.785µs 108,280.261µs 732,235.693µs
17 Kotlin (JVM) 1,566,549.483µs 1,257,669.252µs 2,120,995.080µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times