Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
offsetwidth-vs-outerwidth
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Browser:
Firefox 129
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
jquery
253735.0 Ops/sec
native
700076.4 Ops/sec
HTML Preparation code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <div id="imba" style="margin: 10px;"></div> window.template = "<div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div><div style='width: 20px;'></div>";
Tests:
jquery
$('#imba').html(window.template).outerWidth(true);
native
var imba = document.getElementById('imba'); var m = document.createDocumentFragment(); m.innerHTML += window.template; imba.appendChild(m) imba.offsetWidth;