Benchmarks

Mac Benchmark: Base64 Encode (x3)

Base64 is an encoding scheme used to encode binary data in an ASCII format. This benchmark measures the time taken to encode three strings to Base64: “Hello, World!”, “The quick brown fox jumps over the lazy dog”, and “AaBbCcDdEeFf123456_!@#&*^()$=+-“.

string compression algorithm

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 C++ (Clang++) 1.873µs 1.549µs 3.492µs
2 C (Clang) 3.023µs 2.710µs 4.092µs
3 C (GCC) 3.210µs 2.765µs 6.145µs
4 Go 5.160µs 3.000µs 25.000µs
5 C++ (G++) 5.760µs 4.000µs 8.000µs
6 PHP 6.335µs 3.738µs 51.742µs
7 Python 10.120µs 8.000µs 15.000µs
8 Rust 10.160µs 8.000µs 16.000µs
9 Ruby 10.480µs 8.000µs 19.000µs
10 GraalVM 30.434µs 8.577µs 390.723µs
11 D 61.304µs 48.200µs 144.500µs
12 JavaScript (Node) 112.010µs 55.450µs 1,131.130µs
13 Zig 119.920µs 100.000µs 230.000µs
14 Kotlin (Native) 239.756µs 83.565µs 2,239.357µs
15 JavaScript (Bun) 242.474µs 177.943µs 455.995µs
16 JavaScript (Deno) 284.786µs 233.508µs 469.986µs
17 Java 370.646µs 223.499µs 2,435.291µs
18 Kotlin (JVM) 587,487.176µs 22,144.518µs 1,833,962.616µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times