Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Test Bytes to base64
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
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:
Chrome 141
Operating system:
Windows
Device Platform:
Desktop
Date tested:
6 months ago
Test name
Executions per second
apply
61710.2 Ops/sec
SPREAD
13160.0 Ops/sec
Script Preparation code:
const html = "<!DOCTYPE html>\n" + "<html>\n" + "<head>\n" + " <meta charset=\"UTF-8\" />\n" + " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" + "\n" + " <title>Política de Cookies</title>\n" + "\n" + " <style>\n" + " /*\n" + " * Prefixed by https://autoprefixer.github.io\n" + " * PostCSS: v8.3.6,\n" + " * Autoprefixer: v10.3.1\n" + " * Browsers: > 1%,last 2 versions,not dead\n" + " */\n" + "\n" + " html,\n" + " body {\n" + " margin: 0;\n" + " box-sizing: border-box;\n" + " height: 100%;\n" + " }\n" + "\n" + " *,\n" + " *:before,\n" + " *:after {\n" + " box-sizing: inherit;\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe {\n" + " background-color: #fff;\n" + " box-sizing: border-box;\n" + " color: #141414;\n" + " font-family: \"Open Sans\", sans-serif;\n" + " font-weight: 400;\n" + " line-height: 1.4;\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe body {\n" + " margin: 0;\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe__content {\n" + " box-shadow: 0 0 5px hsla(0, 0%, 69.8%, .5);\n" + " background-color: #fff;\n" + " height: 100%;\n" + " padding: 1rem;\n" + " text-align: center;\n" + " width: 100%;\n" + " }\n" + "\n" + " @media (min-width: 48.063rem) {\n" + " .w-cookies-blocked-iframe__content {\n" + " padding: 2rem;\n" + " }\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe__content__title {\n" + " font-weight: 700;\n" + " margin: 0;\n" + " padding-bottom: 1.5rem;\n" + " text-transform: uppercase;\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe__content__button {\n" + " align-items: center;\n" + " appearance: none;\n" + " background-color: #141414;\n" + " border: .125rem solid;\n" + " border-color: #141414;\n" + " border-radius: 3.125rem;\n" + " color: #ffffff;\n" + " cursor: pointer;\n" + " display: inline-flex;\n" + " font-size: .75rem;\n" + " font-weight: 700;\n" + " gap: .25rem;\n" + " height: 2.5rem;\n" + " justify-content: center;\n" + " letter-spacing: .0625rem;\n" + " line-height: 1.125rem;\n" + " margin: 1.5rem 0;\n" + " padding: 0 1.5rem;\n" + " text-align: start;\n" + " text-decoration: none;\n" + " transform: scale3d(1, 1, 1);\n" + " transform-origin: center;\n" + " transition: transform .2s ease-in-out;\n" + " text-transform: uppercase;\n" + " will-change: transform;\n" + " word-break: normal;\n" + " }\n" + "\n" + " [data-whatinput=mouse] .w-cookies-blocked-iframe__content__button {\n" + " outline: 0;\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe__content__button[disabled],\n" + " .w-cookies-blocked-iframe__content__button[disabled]:focus,\n" + " .w-cookies-blocked-iframe__content__button[disabled]:hover {\n" + " opacity: .3;\n" + " pointer-events: none;\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe__content__button:focus,\n" + " .w-cookies-blocked-iframe__content__button:hover {\n" + " transform: scale3d(1.05, 1.05, 1);\n" + " }\n" + "\n" + " .w-cookies-blocked-iframe__content__text {\n" + " margin: 0;\n" + " }\n" + " </style>\n" + "</head>\n" + "<body class=\"w-cookies-blocked-iframe\">\n" + "<div class=\"w-cookies-blocked-iframe__content\">\n" + " <h4 class=\"w-cookies-blocked-iframe__content__title\">Política de Cookies</h4>\n" + "\n" + " <p class=\"w-cookies-blocked-iframe__content__text\">\n" + " Esta página utiliza cookies Estatísticas, de Preferência e de Marketing. Para visualizar corretamente o conteúdo, é\n" + " necessária a aceitação de todas as categorias de cookies. Para o fazer clique em \"Alterar Preferências\".\n" + " </p>\n" + "\n" + " <button class=\"w-cookies-blocked-iframe__content__button\" onclick=\"parent.window.Cookiebot.renew()\">\n" + " Alterar Preferências\n" + " </button>\n" + "\n" + " <p class=\"w-cookies-blocked-iframe__content__text\">\n" + " Pode alterar as suas preferências de cookies a qualquer altura, na nossa página Política de Cookies.\n" + " </p>\n" + "</div>\n" + "</body>\n" + "</html>\n"
Tests:
apply
function bytesToBinary(bytes) { const chunkSize = 0x8000 // 32 KB let binary = '' for (let i = 0; i < bytes.length; i += chunkSize) { const chunk = bytes.subarray(i, i + chunkSize) binary += String.fromCharCode.apply(null, chunk) } return binary } const utf8Bytes = new TextEncoder().encode(html) const binary = bytesToBinary(utf8Bytes) return btoa(binary)
SPREAD
function bytesToBinary(bytes) { const chunkSize = 0x8000 // 32 KB let binary = '' for (let i = 0; i < bytes.length; i += chunkSize) { const chunk = bytes.subarray(i, i + chunkSize) binary += String.fromCharCode(...chunk) } return binary } const utf8Bytes = new TextEncoder().encode(html) const binary = bytesToBinary(utf8Bytes) return btoa(binary)