Benchmarks

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.279µs 1.170µs 1.534µs
2 C (GCC) 1.397µs 1.282µs 1.530µs
3 C++ (Clang++) 1.888µs 1.712µs 2.454µs
4 Go 4.680µs 3.000µs 19.000µs
5 C++ (G++) 6.080µs 5.000µs 8.000µs
6 PHP 7.059µs 5.142µs 33.960µs
7 Ruby 12.360µs 10.000µs 30.000µs
8 Rust 13.880µs 12.000µs 31.000µs
9 Python 14.280µs 9.000µs 104.000µs
10 Kotlin (Native) 137.055µs 98.129µs 612.611µs
11 JavaScript (Deno) 288.062µs 262.713µs 431.303µs
12 Java 373.379µs 242.065µs 1,802.310µs
13 JavaScript (Bun) 564.895µs 169.100µs 7,548.980µs
14 JavaScript (Node) 740.004µs 180.069µs 13,737.366µs
15 Kotlin (JVM) 364,564.447µs 21,734.016µs 1,458,733.177µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times