array slice vs spread vs structuredClone (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
slice
var params = [ "hello", true, 7 ]
var other = params.slice()
ready
spread
var params = [ "hello", true, 7 ]
var other = [ ...params ]
ready
structuredClone
var params = [ "hello", true, 7 ]
var other = structuredClone(params)
ready

Revisions

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