Remove Duplicate Array Tests
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">
</script>
<script>
Benchmark.prototype.setup = function() {
var array = {
"sample": {
"0": "sample1",
"1": "sample1",
"2": "sample1",
"3": "sample2",
"4": "sample2",
"5": "sample2",
"6": "sample2"
},
"sample1": {
"0": "sample1",
"1": "sample1",
"2": "sample1",
"3": "sample2",
"4": "sample2",
"5": "sample2",
"6": "sample2"
},
"sample2": {
"0": "sample1",
"1": "sample1",
"2": "sample1",
"3": "sample2",
"4": "sample2",
"5": "sample2",
"6": "sample2"
}
}
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Using each method |
|
pending… |
Using for method #1 |
|
pending… |
Using for method #2 |
|
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 1: published by Levi Tomes
- Revision 2: published
- Revision 4: published by Sergey
- Revision 5: published
0 comments