Script Preparation code:
AخA
 
testObject = {'asdf': 'apple', 'afwefg': 'pear', 'hohoo': 'santa', 'country': 'usa', 'bottle': 'gin'};
Tests:
  • key in object

     
    'afwefg' in testObject
  • !!object[key]

     
    !!testObject['afwefg']
  • object[key]

     
    testObject['afwefg']
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    key in object
    !!object[key]
    object[key]

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Linux; Android 8.0.0; SM-G950U1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36
Chrome Mobile 70 on Android 8.0.0
View result in a separate tab
Test name Executions per second
key in object 1965422.4 Ops/sec
!!object[key] 2447303.5 Ops/sec
object[key] 2450138.0 Ops/sec