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 | 4.556µs | 3.106µs | 5.811µs |
2 | PHP | 4.670µs | 4.227µs | 5.230µs |
3 | Rust | 7.722µs | 5.080µs | 11.702µs |
4 | Python | 9.090µs | 6.863µs | 10.901µs |
5 | C++ (G++) | 9.357µs | 6.924µs | 13.776µs |
6 | C++ (Clang++) | 11.989µs | 9.978µs | 14.768µs |
7 | C (GCC) | 15.304µs | 13.425µs | 19.126µs |
8 | C (Clang) | 20.991µs | 17.342µs | 45.545µs |
9 | Ruby | 71.994µs | 9.368µs | 1,492.272µs |
10 | JavaScript (Bun) | 593.846µs | 169.108µs | 5,199.493µs |
11 | JavaScript (Node) | 3,108.880µs | 184.336µs | 49,268.528µs |
12 | JavaScript (Deno) | 4,315.237µs | 242.936µs | 53,467.903µs |
13 | Java | 6,396.092µs | 272.481µs | 48,126.837µs |
14 | Kotlin (Native) | 12,629.972µs | 1,214.891µs | 63,280.441µs |
15 | Kotlin (JVM) | 626,344.012µs | 419,323.501µs | 985,742.335µs |