array-mutable-vs-inmutable
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
const n = 10000;
const defaultValue = 3;
var arr = Array(n).fill(defaultValue);
};
Benchmark.prototype.teardown = function() {
arr = Array(n).fill(defaultValue);
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test | Ops/sec | |
---|---|---|
mutable
|
|
pending… |
immutable
|
|
pending… |
immutable-functional
|
|
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 liyuanqiu
- Revision 2: published wurui
- Revision 3: published wurui
- Revision 4: published wurui
- Revision 5: published wurui
- Revision 6: published
- Revision 7: published
- Revision 8: published
- Revision 9: published
- Revision 10: published
0 Comments