localStorage in versus hasOwnProperty

Benchmark created on


Setup

localStorage.setItem('jsperfaccesscheck', 'foo');

Test runner

Ready to run.

Testing in
TestOps/sec
in existing
'jsperfaccesscheck' in localStorage;
ready
hasOwnProperty existing
localStorage.hasOwnProperty('jsperfaccesscheck');
ready
in not existing
'jsperfaccesschecknot' in localStorage;
ready
hasOwnProperty not existing
localStorage.hasOwnProperty('jsperfaccesschecknot');
ready

Revisions

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