New vs Del (v2)

Revision 2 of this benchmark created on


Setup

const a = Array.from({length: 10000}).map( i => ({id: i, foo: 'delete me' }))

Test runner

Ready to run.

Testing in
TestOps/sec
Delete
for ( var o in a ) {
	delete o.foo;
}
ready
New
const b = a.map( ({o, ...rest}) => rest)
ready

Revisions

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