jQuery.data vs jQuery().data
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="el"></div>
<script>
var i = 0,
el = document.getElementById('el'),
$el = $(el);
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
jQuery.data |
|
pending… |
jQuery.fn.data |
|
pending… |
jQuery.data with $el |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by Sam Korn and last updated
- Revision 4: published
- Revision 5: published
- Revision 6: published by dmig
- Revision 7: published
- Revision 8: published by amenthes
- Revision 10: published by Mike
- Revision 11: published
- Revision 12: published by SMR
- Revision 13: published
- Revision 14: published
- Revision 15: published by dan
- Revision 16: published by dan
- Revision 17: published
- Revision 18: published
- Revision 19: published
- Revision 20: published
- Revision 21: published
- Revision 22: published
- Revision 24: published
- Revision 26: published by Kenneth Kalmer
- Revision 27: published by Nav
- Revision 28: published by Nav
- Revision 29: published by Mike Frey
- Revision 30: published by devu
- Revision 31: published by Mike Frey
- Revision 32: published
- Revision 33: published by Dmitry
- Revision 35: published
- Revision 36: published
- Revision 37: published
- Revision 38: published
- Revision 39: published
- Revision 42: published
- Revision 43: published
- Revision 44: published by dd
- Revision 47: published by Alexander Schmitz
- Revision 48: published by Alexander Schmitz
- Revision 49: published by Dennis Kim
- Revision 50: published
- Revision 51: published
- Revision 52: published
- Revision 53: published
- Revision 55: published
- Revision 56: published
- Revision 57: published
- Revision 58: published by rj
0 comments