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.000µs
3 C++ (Clang++) 2.776µs 2.500µs 3.600µs
4 C++ (G++) 2.992µs 2.700µs 3.800µs
5 PHP 6.056µs 5.200µs 7.400µs
6 D 8.376µs 6.800µs 10.600µs
7 GraalVM 13.668µs 12.400µs 17.000µs
8 Rust 14.884µs 12.200µs 31.200µs
9 Ruby 16.196µs 12.000µs 21.200µs
10 C (Clang) 59.780µs 4.700µs 1,367.800µs
11 JavaScript (Node) 77.544µs 53.100µs 139.200µs
12 Zig 216.816µs 125.600µs 1,553.100µs
13 JavaScript (Deno) 332.276µs 262.800µs 764.100µs
14 Python 733.868µs 10.400µs 18,033.400µs
15 Kotlin (Native) 1,013.196µs 703.800µs 3,279.200µs
16 JavaScript (Bun) 1,450.668µs 243.200µs 16,155.800µs
17 Java 3,838.228µs 307.300µs 62,102.500µs
18 Kotlin (JVM) 110,029.392µs 34,630.700µs 280,983.300µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times