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.871µs 1.631µs 3.983µs
2 C (Clang) 3.033µs 2.873µs 3.183µs
3 C (GCC) 3.226µs 2.973µs 5.306µs
4 Go 3.400µs 3.000µs 4.000µs
5 PHP 4.268µs 3.881µs 5.012µs
6 C++ (G++) 6.160µs 6.000µs 7.000µs
7 Ruby 7.960µs 7.000µs 10.000µs
8 Rust 8.400µs 7.000µs 11.000µs
9 Python 11.800µs 10.000µs 19.000µs
10 GraalVM 14.776µs 10.830µs 52.928µs
11 JavaScript (Node) 66.033µs 56.729µs 141.222µs
12 Kotlin (Native) 105.760µs 88.023µs 344.808µs
13 Zig 121.360µs 109.000µs 314.000µs
14 JavaScript (Deno) 297.644µs 245.392µs 1,043.923µs
15 Java 578.850µs 221.977µs 6,188.013µs
16 JavaScript (Bun) 21,289.807µs 183.198µs 526,531.702µs
17 Kotlin (JVM) 700,122.262µs 24,394.338µs 1,994,974.222µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times