The delete statement vs Map.prototype.delete

Benchmark created by BretCameron on


Setup

let map = new Map([['a', 1]]), obj = { a: 1 };

Test runner

Ready to run.

Testing in
TestOps/sec
Delete Statement
delete obj.a;
ready
Map.prototype.delete
map.delete('a');
ready

Revisions

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

  • Revision 1: published by BretCameron on