testaske
JavaScript performance comparison
Preparation code
<html>
<style type="text/css">
.content{
display:none;
}
</style>
<body>
<div id="placeHolder">
</div>
<div class="content">
content
<div class="subcontent">
sub
<div class="subsubcontent">
subsub
</div>
</div>
</div>
<script src="http://zeptojs.com/zepto.js">
</script>
</body>
</html>
<script>
Benchmark.prototype.setup = function() {
var $content = $(".content"),
$placeHolder = $("#placeHolder");
};
</script>
Preparation code output
content
sub
subsub
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
show/hide |
|
pending… |
css visibility |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments