dereference bencmark
JavaScript performance comparison
Preparation code
<script>
var ints1 = [];
var ints2 = [];
var ints3 = [];
for (var i = 0; i < 1024 * 1024; i++) {
ints1.push(Math.floor(Math.random() * (ints1.length + 1)));
}
for (var i = 0; i < 1024 * 1024 * 10; i++) {
ints2.push(Math.floor(Math.random() * (ints2.length + 1)));
}
for (var i = 0; i < 1024 * 1024 * 50; i++) {
ints3.push(Math.floor(Math.random() * (ints3.length + 1)));
}
</script>
<script>
Benchmark.prototype.setup = function() {
var icur = 0;
// http://stackoverflow.com/questions/962802#962890
// current = Math.floor(Math.random() * (top + 1));
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
random walk 100k*001 |
|
pending… |
random walk 100k*010 |
|
pending… |
random walk 100k*050 |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments