HTML Preparation code:
AخA
 
1
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
2
<div id="test">Test</div>
Tests:
  • Vanilla JS

    x
     
    var el = document.getElementById("test");
    window.addEventListener('scroll', function() {
        console.log(el)
    })
  • Jquery

     
    var el = document.getElementById("test");
    $(window).on('scroll', function() {
        console.log(el)
    })
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Vanilla JS
    Jquery

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Vanilla JS 1354.0 Ops/sec
Jquery 277006.0 Ops/sec