eval vs. jquery selector (v77)

Revision 77 of this benchmark created by ermaneng on


Description

Compare the speed of jquery selector to eval

Preparation HTML

<script src = "http://code.jquery.com/jquery-1.11.0.min.js" ></script>
<p id="foo">Foo</p>
<p id="bar_87949845616519816516541651651984894611165156165">Bar</p>
<p id="baz">Baz</p>

Test runner

Ready to run.

Testing in
TestOps/sec
eval
var bar = eval("bar_87949845616519816516541651651984894611165156165");
ready
jquery
var bar = $("#bar_87949845616519816516541651651984894611165156165");
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.