Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JQUERY VS VANILLA v-na2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
Browser:
Firefox 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
JQ
11260.8 Ops/sec
Vanilla
17639.7 Ops/sec
Vanilla No Map
19985.3 Ops/sec
HTML Preparation code:
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div>
Tests:
JQ
$("div").each(function(i){ $(this).text("a"); });
Vanilla
[...document.querySelectorAll("div")].map(e=>{ e.innerText = "a"; });
Vanilla No Map
let divs = document.querySelectorAll("div"); for(let i=1;i<divs.length;i++){ divs[i].innerText = "a"; }