arraytypesread
JavaScript performance comparison
Info
Read tests about different array types
Preparation code
<script>
Benchmark.prototype.setup = function() {
var sectorcount = 48;
var sectorsize = 512;
var cnt = sectorsize * sectorcount;
var aru = new Uint8Array(cnt);
var arn = new Array(cnt);
var rand = Math.floor(Math.random() * (cnt + 1))
for (i = 0; i < cnt; i++) {
aru[i] = 0xff;
arn[i] = 0xff;
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Read Array |
|
pending… |
Read Uint8Array |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments