Test name | Executions per second |
---|---|
Vanilla Get ID | 3976461.2 Ops/sec |
jQuery Get ID | 1122955.1 Ops/sec |
Zepto Get Html | 876986.8 Ops/sec |
Zepto Get Text | 471340.5 Ops/sec |
Zepto Get ID | 1225085.9 Ops/sec |
Bliss Get Text | 1429541.5 Ops/sec |
Bliss Get ID | 1610993.6 Ops/sec |
jQuery Get Text | 690826.8 Ops/sec |
Umbrella Get HTML | 228882.6 Ops/sec |
Umbrella Get ID | 261303.6 Ops/sec |
Cash Get Html | 1055273.4 Ops/sec |
Cash Get Text | 1462325.0 Ops/sec |
Cash Get ID | 1693601.5 Ops/sec |
Vanilla Get Html | 1748248.1 Ops/sec |
Vanilla Get Text | 2739030.5 Ops/sec |
Umbrella Get Text | 263580.2 Ops/sec |
jQuery Get Html | 660063.4 Ops/sec |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"><script>
<script>jQuery.noConflict();</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cash/8.1.0/cash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blissfuljs/1.0.6/bliss.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/umbrella/3.2.3/umbrella.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/ext-all.js"></script>
<div id="foo">Hello World</div>
var text = document.getElementById("foo");
var text = document.querySelector("#foo");
var text = document.querySelectorAll("#foo");
var text = document.getElementById("foo").textContent;
var text = document.getElementById("foo").innerHTML;
var text = $("#foo");
var text = $("#foo").text();
var text = $("#foo").html();
var text = jQuery("#foo");
var text = jQuery("#foo").text();
var text = jQuery("#foo").html();
var text = Zepto("#foo");
var text = Zepto("#foo").text();
var text = Zepto("#foo").html();
var text = Bliss("#foo");
var text = Bliss("#foo").textContent;
var text = Bliss("#foo").htmlContent;
var text = u("#foo");
var text = u("#foo").text();
var text = u("#foo").html();
var text = Ext.get('foo');