Test name | Executions per second |
---|---|
Vanilla Get ID | 7827314.5 Ops/sec |
Vanilla Get Text | 5708353.0 Ops/sec |
Vanilla Get Html | 5264480.0 Ops/sec |
Cash Get ID | 4822304.5 Ops/sec |
Cash Get Text | 3874311.0 Ops/sec |
Cash Get Html | 3702125.8 Ops/sec |
Bliss Get ID | 3405957.5 Ops/sec |
Bliss Get Text | 2903713.0 Ops/sec |
jQuery Get ID | 4331447.0 Ops/sec |
jQuery Get Text | 2727813.8 Ops/sec |
jQuery Get Html | 3275832.5 Ops/sec |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"><script>
<script>
jQuery.noConflict();
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blissfuljs/1.0.4/bliss.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cash/2.3.9/cash.min.js"></script>
<div id="foo">Hello World</div>
var text = document.getElementById("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 = Bliss("#foo");
var text = Bliss("#foo").textContent;
var text = jQuery("#foo");
var text = jQuery("#foo").text();
var text = jQuery("#foo").html();