TypedArray vs. Array
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var temp_typed_array = new Float32Array(65536);
var temp_array = new Array(65536);
var access_array = new Array(1024);
for(var i=0; i<access_array.length; ++i)
access_array[i] = Math.floor(Math.random() * 65536);
var temp = 47.11;
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
TypedArray (random write) |
|
pending… |
Array (random write) |
|
pending… |
TypedArray (sequencial write) |
|
pending… |
Array (sequencial write) |
|
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 Timm
- Revision 2: published
- Revision 3: published
0 comments