delete vs undefined vs null (v34)

Revision 34 of this benchmark created by Midel on


Setup

var o = {
    p: new Date()
  };

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 = false
 o.p = false;
ready
object["property"] = false
 o["p"] = false;
ready
object.property = null
 o.p = null;
ready
object.property = undefined
 o.p = undefined;
ready
object.property = void 0
o.p = void 0;
ready

Revisions

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