shallow copying
JavaScript performance comparison
Preparation code
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script>
<script>
Benchmark.prototype.setup = function() {
var original = {
foo: {
bar: [1,2,3,4,5]
},
bar: ['foo', 'bar', 'baz']
};
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test | Ops/sec | |
---|---|---|
json
|
|
pending… |
reduce
|
|
pending… |
foreach
|
|
pending… |
underscore
|
|
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.
- Revision 1: published
- Revision 2: published
- Revision 3: published
- Revision 4: published
0 Comments