Test name | Executions per second |
---|---|
Int16Array | 12689053.0 Ops/sec |
Plain JS array | 11226958.0 Ops/sec |
var int16 = new Int16Array(100);
var regular = [];
for(var i=0;i<100;i++){
int16[i] = i;
regular.push(i);
}
var sum = 0;
for(var i=0;i<100;i++){
sum = sum + int16[i];
}
var sum = 0;
for(var i=0;i<100;i++){
sum = sum + regular[i];
}