Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
jquery vs select
test
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/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
queryselect
4.3 Ops/sec
jquery
2.2 Ops/sec
HTML Preparation code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <select id="select"> </select>
Script Preparation code:
var max = 2000; var select=$("#select"); for(i=0;i<max;i++){ select.append('<option value="'+i+'"></option>'); }
Tests:
queryselect
var max = 2000; for(i=0;i<max;i++){ var option = document.querySelector("#select option[value='"+i+"']"); option.setAttribute('selected',true); }
jquery
var max = 2000; for(i=0;i<max;i++){ var option = $("#select option[value='"+i+"']"); option.attr('selected',true); }