spread vs assign (v3)

Revision 3 of this benchmark created on


Description

Setup

const res = {}
const a = { "foo": "bar" }
const b = { "bar": "foo" }

Test runner

Ready to run.

Testing in
TestOps/sec
assign
const res = Object.assign(Object.assign({}, a), b);
ready
spread
const res ={...a, ...b};
ready

Revisions

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