Run details:
Mozilla/5.0 (Linux; Android 9; LG-H933) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36
Chrome Mobile 80
Android
Mobile
4 years ago
Test name Executions per second
Vanilla Get ID 1656655.0 Ops/sec
Vanilla Get Text 1202295.0 Ops/sec
Vanilla Get Html 714737.1 Ops/sec
Cash Get ID 712962.1 Ops/sec
Cash Get Text 581907.4 Ops/sec
Cash Get Html 421190.5 Ops/sec
Bliss Get ID 655448.0 Ops/sec
Bliss Get Text 586493.7 Ops/sec
jQuery Get ID 462089.0 Ops/sec
jQuery Get Text 312616.7 Ops/sec
jQuery Get Html 284821.1 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"><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/2.3.9/cash.min.js"></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();