clone array (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
slice
var a = ['a', 'b', 'c'].slice(0);
ready
concat
var b = [].concat(['a', 'b', 'c']);
ready
concat reversed
var c = ['a', 'b', 'c'].concat([]);
ready
ES6
var d = [...['a', 'b', 'c']];
ready
JSON stringify
var e = JSON.parse(JSON.stringify(['a', 'b', 'c']))
ready

Revisions

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