Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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:
3 months ago
Benchmark engine:
Benchmark.js
none
140K/s
native
75K/s
dompurify
25K/s
View exact numbers
Test name
Executions per second
✓
none
139,747 Ops/sec
native
75,248 Ops/sec
dompurify
24,842 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;