this.href vs $el.attr('href')

Benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<a id="linkElem" href="http://www.google.com">Google Link</a>
<script>
  
  var $el=$('#linkElem'),$el0=$el[0];
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
$el0.href
$el0.href
ready
$el.attr('href')
$el.attr('href')
ready

Revisions

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