Javascript Array Grouping
JavaScript performance comparison
Info
different methods for grouping string in an array and getting the max value of the grouping.
Preparation code
<script>
var arr = [];
var day, month, year;
for(var i = 0; i<6000; i++) {
day = Math.round(Math.random()*30);
month = Math.round(Math.random()*12);
year = Math.round(Math.random()*3 + 2009);
arr.push(month + "/" + day + "/" + year);
}
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
nightcracker |
|
pending… |
Mike Samuel |
|
pending… |
Original |
|
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 Joey
- Revision 2: published by Javier Pelado
0 comments