delete vs null vs undefined

Benchmark created on


Setup

var a = {foo: 'foo', bar: 'bar'};

Test runner

Ready to run.

Testing in
TestOps/sec
delete
delete a.foo;
ready
null
a.foo = null;
ready
undefined
a.foo = undefined
ready

Revisions

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