Benchmarks

Mac 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 17.760µs 15.000µs 36.000µs
2 PHP 25.833µs 23.789µs 33.956µs
3 C (Clang) 39.046µs 35.580µs 53.166µs
4 C (GCC) 40.031µs 36.566µs 54.777µs
5 D 59.948µs 48.300µs 162.100µs
6 Python 66.920µs 39.000µs 574.000µs
7 Rust 84.160µs 76.000µs 146.000µs
8 Zig 103.280µs 89.000µs 325.000µs
9 GraalVM 188.488µs 125.043µs 625.306µs
10 C++ (G++) 206.000µs 170.000µs 380.000µs
11 C++ (Clang++) 350.220µs 291.206µs 617.013µs
12 Kotlin (Native) 492.981µs 386.578µs 741.420µs
13 Ruby 1,317.040µs 863.000µs 4,292.000µs
14 JavaScript (Node) 1,890.253µs 1,350.281µs 5,080.597µs
15 JavaScript (Deno) 2,209.136µs 1,523.437µs 8,707.148µs
16 JavaScript (Bun) 92,461.476µs 2,411.749µs 709,825.632µs
17 Java 362,231.298µs 19,442.969µs 1,578,245.894µs
18 Kotlin (JVM) 1,343,184.238µs 54,981.020µs 2,696,391.393µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times