HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
var x = {'this': 'is', 'a': 'test', 'object': 52 }
Tests:
  • lodash

     
    var y = _.isObject(x)
  • typeof

     
    var y = (typeof(x) === 'object')
  • toString

     
    var y = toString.call(x) === "[object Object]";
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    lodash
    typeof
    toString

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/122.0.6261.62 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 122 on iOS 16.6
View result in a separate tab
Test name Executions per second
lodash 11487659.0 Ops/sec
typeof 26687140.0 Ops/sec
toString 4164956.8 Ops/sec