double call of jQuery.css vs. css property object
JavaScript performance comparison
Info
Flow could be "left" or "right"
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="contentDiv">Some stuff</div>
<script>
Benchmark.prototype.setup = function() {
var contentDiv = $("#contentDiv");
var flow = "left";
var cssProps;
};
</script>
Preparation code output
Some stuff
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