Benchmarks

Linux 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 Go 2.755µs 1.553µs 3.827µs
2 PHP 4.856µs 3.918µs 6.452µs
3 GraalVM 4.990µs 3.186µs 22.512µs
4 Ruby 8.232µs 7.454µs 9.408µs
5 C++ (G++) 9.635µs 8.035µs 11.982µs
6 Rust 9.646µs 7.273µs 16.250µs
7 Python 10.691µs 9.067µs 12.594µs
8 C++ (Clang++) 11.852µs 8.997µs 14.708µs
9 C (GCC) 14.264µs 12.984µs 16.892µs
10 C (Clang) 19.175µs 16.852µs 24.176µs
11 JavaScript (Node) 60.496µs 52.168µs 76.894µs
12 JavaScript (Bun) 249.760µs 213.661µs 287.784µs
13 Zig 2,489.535µs 149.230µs 34,879.778µs
14 Java 2,791.007µs 264.517µs 62,360.781µs
15 D 3,499.568µs 43.500µs 56,491.000µs
16 Kotlin (Native) 8,995.058µs 763.343µs 69,864.982µs
17 JavaScript (Deno) 9,824.653µs 232.286µs 52,441.394µs
18 Kotlin (JVM) 724,592.482µs 540,246.131µs 892,827.128µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times