copy array map filter slice

Benchmark created by jason on


Setup

var array1 = [1,2,3,4,5,6,7,8,9,0];

Test runner

Ready to run.

Testing in
TestOps/sec
map
var array2 = array.map( function(x){return x} );
ready
filter
var array2 = array.filter( function(x){return true} );
ready
slice
var array2 = array.slice();
ready

Revisions

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