Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
custom element vs div init
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:135.0) Gecko/135.0 Firefox/135.0
Browser:
Firefox Mobile 135
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
div
150.9 Ops/sec
class
45.1 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
class Custom extends HTMLElement { constructor() { super() } } customElements.define("custom-me", Custom) function create() { return document.createElement('div') }
Tests:
div
for(let i = 0; i< 10000; i++){create()}
class
for(let i = 0; i< 10000; i++){new Custom()}