Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Firefox 84
Windows
Desktop
4 years ago
Test name Executions per second
Vanilla Get ID 5328661.5 Ops/sec
Umbrella Get Text 296743.8 Ops/sec
Umbrella Get ID 343194.4 Ops/sec
Bliss Get HTML 1315084.1 Ops/sec
Bliss Get Text 1303911.6 Ops/sec
Bliss Get ID 1629203.8 Ops/sec
Zepto Get HTML 1539809.1 Ops/sec
Zepto Get Text 1005046.7 Ops/sec
Zepto Get ID 3441691.2 Ops/sec
Umbrella Get HTML 286064.1 Ops/sec
jQuery Get HTML 1711172.8 Ops/sec
jQuery Get ID 4261926.0 Ops/sec
Cash Get HTML 2287500.0 Ops/sec
Cash Get Text 3606017.8 Ops/sec
Cash Get ID 3906929.8 Ops/sec
Vanilla Get HTML 3867942.8 Ops/sec
Vanilla Get Text 3924910.8 Ops/sec
Vanilla Get ID (QuerySelectorAll) 1033412.8 Ops/sec
Vanilla Get ID (QuerySelector) 2868527.5 Ops/sec
jQuery Get Text 1870139.1 Ops/sec
Ext Get ID 2434930.0 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"><script>
2
<script>jQuery.noConflict();</script>
3
<script src="https://cdnjs.cloudflare.com/ajax/libs/cash/8.1.0/cash.min.js"></script>
4
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
5
<script src="https://cdnjs.cloudflare.com/ajax/libs/blissfuljs/1.0.6/bliss.min.js"></script>
6
<script src="https://cdnjs.cloudflare.com/ajax/libs/umbrella/3.2.3/umbrella.min.js"></script>
7
<script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/ext-all.js"></script>
8
<div id="foo">Hello World</div>
Tests:
  • Vanilla Get ID

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

     
    var text = document.querySelector("#foo");
  • Vanilla Get ID (QuerySelectorAll)

     
    var text = document.querySelectorAll("#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();
  • jQuery Get ID

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

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

     
    var text = jQuery("#foo").html();
  • Zepto Get ID

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

     
    var text = Zepto("#foo").text();
  • Zepto Get HTML

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

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

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

     
    var text = Bliss("#foo").htmlContent;
  • Umbrella Get ID

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

     
    var text = u("#foo").text();
  • Umbrella Get HTML

     
    var text = u("#foo").html();
  • Ext Get ID

     
    var text = Ext.get('foo');