double call of jQuery.css vs. css property object creating
JavaScript performance comparison
Info
The flow variable can be either "left" or "right".
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="contentDiv">
</div>
<script>
Benchmark.prototype.setup = function() {
var contentDiv = $("#contentDiv");
var flow = "left";
var cssProps;
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
with double call to jQuery.css |
|
pending… |
with css Property object and one call to jQuery.css |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments