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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Browser:
Chrome 128
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
dompurify
26774.2 Ops/sec
native
0.0 Ops/sec
none
206624.0 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;