in vs hasownproperty

Benchmark created by jeremy on


Setup

var options = {
       fred: 'flinstone'
    };

Test runner

Ready to run.

Testing in
TestOps/sec
in
if('fred' in options) return;
ready
hasOwnProperty
if(options.hasOwnProperty('fred')) return;
ready

Revisions

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

  • Revision 1: published by jeremy on