Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
lodash.get 28215488.0 Ops/sec
Optional chaining (babel es2015) 167630336.0 Ops/sec
safeGet 20120956.0 Ops/sec
dlv (dot notation) 18254192.0 Ops/sec
dlv (array notation) 25164888.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash.get

  • Optional chaining (babel es2015)

  • safeGet

  • dlv (dot notation)

  • dlv (array notation)