fn vs jq
Date tested:
4 years ago
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36
Test name
Executions per second
JQ
3766.3 Ops/sec
JQloaded
17154.6 Ops/sec
Benchmark definition (click to collapse):
HTML Preparation code:
<div class='.one'></div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js'></script>
Tests:
JQ
for(let i = 0; i < 100; i++) { let a = $('.one').html(); $('.one').append(i); }
JQloaded
let d = $('.one'); for(let i = 0; i < 100; i++) { let a = d.html(); d.append(i); }
Open this result on MeasureThat.net