Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
Chrome 90
Windows
Desktop
3 years ago
Test name Executions per second
Vanilla Get ID 3933939.0 Ops/sec
Vanilla Get Text 3293450.5 Ops/sec
Vanilla Get Html 2797192.8 Ops/sec
Cash Get ID 2113486.5 Ops/sec
Cash Get Text 1842747.2 Ops/sec
Cash Get Html 1643172.8 Ops/sec
Bliss Get ID 1808429.8 Ops/sec
Bliss Get Text 1624175.5 Ops/sec
jQuery Get ID 1874557.9 Ops/sec
jQuery Get Text 1279883.8 Ops/sec
jQuery Get Html 1413797.9 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
2
<script>
3
  jQuery.noConflict();  
4
</script>
5
<script src="https://cdnjs.cloudflare.com/ajax/libs/blissfuljs/1.0.4/bliss.min.js"></script>
6
<script src="https://cdnjs.cloudflare.com/ajax/libs/cash/8.1.0/cash.min.js" integrity="sha512-sgDgZX/GgfD7qSeMjPN/oE9EQgXZJW55FIjdexVT60QerG2gAWhR9QDQEGt3O90Dy9jVcwMWsoTMhLgldIiKXw==" crossorigin="anonymous"></script>
7
<div id="foo">Hello World</div>
Tests:
  • Vanilla Get ID

     
    var text = document.getElementById("foo");
  • Vanilla Get Text

     
    var text = document.getElementById("foo").textContent;
  • Vanilla Get Html

     
    var text = document.getElementById("foo").innerHTML;
  • Cash Get ID

     
    var text = $("#foo");
  • Cash Get Text

     
    var text = $("#foo").text();
  • Cash Get Html

     
    var text = $("#foo").html();
  • Bliss Get ID

     
    var text = Bliss("#foo");
  • Bliss Get Text

     
    var text = Bliss("#foo").textContent;
  • jQuery Get ID

     
    var text = jQuery("#foo");
  • jQuery Get Text

     
    var text = jQuery("#foo").text();
  • jQuery Get Html

     
    var text = jQuery("#foo").html();