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 | 0.000µs | 0.000µs | 0.000µs |
2 | C (GCC) | 1.544µs | 1.400µs | 1.800µs |
3 | C (Clang) | 1.984µs | 1.800µs | 2.800µs |
4 | C++ (Clang++) | 2.868µs | 2.500µs | 3.400µs |
5 | C++ (G++) | 4.288µs | 3.100µs | 6.000µs |
6 | PHP | 8.460µs | 4.500µs | 70.000µs |
7 | Rust | 16.032µs | 14.700µs | 17.900µs |
8 | Ruby | 18.384µs | 13.700µs | 47.900µs |
9 | JavaScript (Node) | 288.120µs | 219.700µs | 329.800µs |
10 | JavaScript (Bun) | 389.328µs | 216.600µs | 2,213.300µs |
11 | Java | 467.700µs | 317.800µs | 1,656.800µs |
12 | JavaScript (Deno) | 1,113.476µs | 308.300µs | 15,631.100µs |
13 | Python | 1,210.944µs | 12.600µs | 29,836.900µs |
14 | Kotlin (Native) | 2,128.716µs | 879.600µs | 13,233.500µs |
15 | Kotlin (JVM) | 101,217.320µs | 43,940.900µs | 330,490.900µs |