testing stuff (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<ul>
  <li value="10">
    Item One
  </li>
  <li value="20">
    Item Two
  </li>
  <li value="30">
    Item three
  </li>
  <li value="40">
    Item Four
  </li>
  <li value="50">
    Item Five
  </li>
</ul>

Test runner

Ready to run.

Testing in
TestOps/sec
each
var myVals = [];
$('li', 'ul').each(function() {
  myVals.push($(this).attr('value'));
});
ready
map
var myVals = $('li', 'ul').map(function() {
  return $(this).attr('value');
}).toArray();
ready

Revisions

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