Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
dompurify vs native vs none
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 16; Mobile; rv:151.0) Gecko/151.0 Firefox/151.0
Browser:
Firefox Mobile 151
Operating system:
Android
Device Platform:
Mobile
Date tested:
one month ago
Test name
Executions per second
dompurify
24841.9 Ops/sec
native
75247.8 Ops/sec
none
139747.2 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/gh/cure53/DOMPurify/dist/purify.js"></script> <div id="foo">hello</div>
Script Preparation code:
window.testString = '<div id="hello">hello</div>';
Tests:
dompurify
document.getElementById("foo").innerHTML = DOMPurify.sanitize(window.testString);
native
document.getElementById("foo").setHTML(window.testString);
none
document.getElementById("foo").innerHTML = window.testString;