Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
jQuery height Vs Native height
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/138.0.0.0 Safari/537.36
Browser:
Chrome 138
Operating system:
Windows
Device Platform:
Desktop
Date tested:
10 months ago
Test name
Executions per second
jQuery CSS function
343093.9 Ops/sec
jQuery height function
283271.8 Ops/sec
jquery inline styling
23540418.0 Ops/sec
native inline styling
23769052.0 Ops/sec
Native offsetHeight (IE8+)
1889653.5 Ops/sec
HTML Preparation code:
<script src="https://code.jquery.com/jquery-3.4.0.min.js" integrity="sha256-BJeo0qm959uMBGb65z40ejJYGSgR7REI4+CW1fNKwOg=" crossorigin="anonymous"></script> <div id="target"> </div>
Script Preparation code:
var $target = $("#target"); var target = document.getElementById("target");
Tests:
jQuery CSS function
$target.css("height");
jQuery height function
$target.height();
jquery inline styling
$target[0].style.height;
native inline styling
target.style.height;
Native offsetHeight (IE8+)
target.offsetHeight;