Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JQUERY VS VANILLA v-na4
(version: 0)
Comparing performance of:
JQ vs Vanilla vs Vanilla No Map vs Vanilla getElements vs Vanilla getElements No Map
Created:
3 years ago
by:
Guest
Jump to the latest result
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>
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=0;i<divs.length;i++){ divs[i].innerText = "a"; }
Vanilla getElements
[...document.getElementsByTagName("div")].map(e=>{ e.innerText = "a"; });
Vanilla getElements No Map
let divs = document.getElementsByTagName("div"); for(let i=0;i<divs.length;i++){ divs[i].innerText = "a"; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (5)
Previous results
Fork
Test case name
Result
JQ
Vanilla
Vanilla No Map
Vanilla getElements
Vanilla getElements No Map
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
JQUERY VS VANILLA v-na0
JQUERY VS VANILLA v-na1
JQUERY VS VANILLA v-na2
JQUERY VS VANILLA v-na3
Comments
Confirm delete:
Do you really want to delete benchmark?