delete vs undefined vs null (v102)

Revision 102 of this benchmark created by Th0rN13 on


Setup

var o = {
     p: 1
  };

Test runner

Ready to run.

Testing in
TestOps/sec
delete object.property
delete o.p;
ready
delete object["property"]
delete o["p"];
ready
object.property = null
o.p = null;
ready
object.property = undefined
o.p = undefined;
ready
object.property = false
o.p = false;
ready
object["property"] = false
o["p"] = false;
ready
destructuring
{p: _; ...o} = o;
ready

Revisions

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