Find disabled jQuery vs. lodash vs. native
JavaScript performance comparison
Info
See if avoiding sizzle makes a big difference.
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.3/lodash.min.js">
</script>
<form id="test">
<select name="enabledSelect">
<option value="1">
One
</option>
</select>
<input name="disabledText" type="text" value="Hello" disabled="disabled">
<select name="disabledSelect" disabled="disabled">
<option value="2">
Two
</option>
</select>
<input type="text" id="enabledText" value="Good, enabled">
<input type="checkbox" name="enabledCheck" checked="checked">
<button>
Submit
</button>
</form>
<script>
Benchmark.prototype.setup = function() {
var el = document.getElementById('enabledText');
};
</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 siblings and disabled |
|
pending… |
jQuery siblings - lodash filter disabled |
|
pending… |
Siblings / Disabled Native |
|
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
- Revision 2: published and last updated
0 comments