Benchmarks

Windows 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.600µs 1.400µs 2.100µs
3 C++ (Clang++) 2.924µs 2.700µs 3.300µs
4 C++ (G++) 4.580µs 4.000µs 5.400µs
5 PHP 6.044µs 5.000µs 7.500µs
6 C (Clang) 6.612µs 5.300µs 28.000µs
7 Rust 13.992µs 11.100µs 49.400µs
8 GraalVM 16.924µs 13.400µs 45.500µs
9 Ruby 17.392µs 14.800µs 21.500µs
10 Python 64.836µs 12.900µs 1,255.200µs
11 JavaScript (Node) 74.296µs 51.000µs 112.600µs
12 Zig 160.964µs 127.900µs 217.200µs
13 JavaScript (Deno) 403.164µs 293.400µs 1,225.700µs
14 JavaScript (Bun) 455.436µs 255.500µs 1,608.800µs
15 Java 566.904µs 349.700µs 1,538.400µs
16 Kotlin (Native) 1,757.580µs 754.100µs 7,567.600µs
17 Kotlin (JVM) 174,690.376µs 66,236.200µs 457,996.600µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times