test-speed-obj
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
function OBJ_1( obj ){
return obj.x;
}
obj1 = {
x: 10
}
function OBJ_2(){}
OBJ_2.prototype.getX = function(){
return this.x;
}
obj2 = new OBJ_2();
sum = 0;
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
functional |
|
pending… |
class object |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments