Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
base64 test
(version: 1)
Comparing performance of:
atob and btoa vs 2
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function generateText(sizeMB) { const lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "; const repeatCount = Math.ceil((sizeMB * 1024 * 1024) / lorem.length); return lorem.repeat(repeatCount).slice(0, sizeMB * 1024 * 1024); // Trim to exact size } // Generate 20MB of text const text = generateText(20); // Convert to Base64 var base64Encoded = btoa(text);
Tests:
atob and btoa
btoa(atob(base64Encoded)) === base64Encoded
2
btoa(atob(base64Encoded)) === base64Encoded
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
atob and btoa
2
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Browser/OS:
Chrome 141 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
atob and btoa
25.8 Ops/sec
2
25.5 Ops/sec
Related benchmarks:
Text.data vs Text.nodeValue
Lodash _.some vs _.includes
Object entries, values, keys perf
Split vs Spread (randomized)
lodash _.some vs Array.some
string concat big string
generateRandomString
String character looping
Measure speed
Comments
Confirm delete:
Do you really want to delete benchmark?