Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2850.0 Iron Safari/537.36
Chrome 54
Windows
Other
8 years ago
Test name Executions per second
jQuery 3.1.1 Slim 541597.8 Ops/sec
Vanilla JS 1929331.5 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.slim.min.js"></script>
2
<div class="test"></div>
3
<div class="test2"></div>
Tests:
  • jQuery 3.1.1 Slim

     
    var el = $(".test");
  • Vanilla JS

     
    var el = document.getElementsByClassName('test');