HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/lodash/4.16.0/lodash.min.js"></script>
Script Preparation code:
 
var user = {name: 'John', lastName: 'Doe', foo: { bar: "baz" } };
Tests:
  • lodash.get

     
    _.get(user, 'foo.bar');
  • native JS

     
    user && user.foo && user.foo.bar
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    lodash.get
    native JS

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36
Chrome 80 on Mac OS X 10.12.5
View result in a separate tab
Test name Executions per second
lodash.get 2320872.5 Ops/sec
native JS 4673879.5 Ops/sec