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.671µs 1.553µs 3.777µs
2 GraalVM 4.163µs 3.446µs 5.210µs
3 PHP 5.584µs 4.017µs 26.390µs
4 C++ (G++) 9.228µs 7.665µs 13.356µs
5 Rust 10.065µs 7.995µs 12.364µs
6 Ruby 10.177µs 7.735µs 27.142µs
7 Python 10.424µs 8.656µs 22.022µs
8 C++ (Clang++) 12.267µs 10.200µs 26.821µs
9 C (GCC) 16.681µs 14.087µs 32.431µs
10 C (Clang) 19.679µs 16.963µs 23.535µs
11 Zig 170.742µs 154.762µs 201.671µs
12 JavaScript (Bun) 740.120µs 190.461µs 13,036.827µs
13 Java 834.583µs 276.665µs 13,574.488µs
14 Kotlin (Native) 1,541.621µs 737.089µs 6,135.515µs
15 JavaScript (Node) 3,307.477µs 53.170µs 52,954.441µs
16 JavaScript (Deno) 5,762.163µs 237.261µs 66,613.594µs
17 Kotlin (JVM) 713,281.867µs 488,755.674µs 1,044,212.674µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times