array copy
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var array = new Array(1, 2, 3, 4, 5);
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
for-loop |
|
pending… |
slice |
|
pending… |
concat |
|
pending… |
modified for-loop |
|
pending… |
push in for-loop |
|
pending… |
while-loop |
|
pending… |
push |
|
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. Here’s a list of current revisions for this page:
- Revision 2: published by keville
- Revision 3: published
- Revision 4: published by Paul Grenier
- Revision 5: published
- Revision 6: published
- Revision 7: published by Jonathan Perry
- Revision 9: published
0 comments