Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.2467 YaBrowser/23.11.0.2467 Yowser/2.5 Safari/537.36
Yandex Browser 23
Mac OS X 10.15.7
Desktop
11 months ago
Test name Executions per second
in (true) 16126449.0 Ops/sec
in (false) 16064166.0 Ops/sec
obj.hasOwnProperty (true) 14155667.0 Ops/sec
obj.hasOwnProperty (false) 13872129.0 Ops/sec
prototype.hasOwnProperty.call (true) 4741770.0 Ops/sec
prototype.hasOwnProperty.call (false) 4914296.5 Ops/sec
Script Preparation code:
Tests:
  • in (true)

  • in (false)

  • obj.hasOwnProperty (true)

  • obj.hasOwnProperty (false)

  • prototype.hasOwnProperty.call (true)

  • prototype.hasOwnProperty.call (false)


;