delete vs undefined vs null (v103)

Revision 103 of this benchmark created by Th0rN13 on


Setup

var o = {
     p: 1
  };

Test runner

Ready to run.

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

Revisions

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