the cost of creating a typed array

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
new typed array
var typedArray = new Uint8Array(20);
ready
!! cast
for (var i = 0; i < 20; ++i) {
  var a = !! 1;
  var b = !! 'string';
}
ready
new array
var array = new Array(20);
ready
boolean cast
for (var i = 0; i < 20; ++i) {
  var a = Boolean(1);
  var b = Boolean('string');
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.