Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
native inline styling
12.7M/s
jquery inline styling
12.1M/s
Native offsetHeight (IE8+)
1.5M/s
jQuery CSS function
198K/s
jQuery height function
164K/s
View exact numbers
Test name
Executions per second
✓
native inline styling
12,735,894 Ops/sec
jquery inline styling
12,137,222 Ops/sec
Native offsetHeight (IE8+)
1,469,953 Ops/sec
jQuery CSS function
198,412 Ops/sec
jQuery height function
164,018 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;