Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36
Chrome 84
Windows
Desktop
4 years ago
Test name Executions per second
Get value in object by key 28201.2 Ops/sec
Get value by filtering array 559.2 Ops/sec
Get value by mapping array 449.8 Ops/sec
Get value by forEach array 596.0 Ops/sec
Get value by forEach lodash array 1994.8 Ops/sec
Get value by forEach object 104.1 Ops/sec
Get value by forEach in value object 93.0 Ops/sec
Get value by lodash filter in value object 89.6 Ops/sec
Get value by filter in value array 446.1 Ops/sec
Get value by lodash filter in value array 1261.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Get value in object by key

  • Get value by filtering array

  • Get value by mapping array

  • Get value by forEach array

  • Get value by forEach lodash array

  • Get value by forEach object

  • Get value by forEach in value object

  • Get value by lodash filter in value object

  • Get value by filter in value array

  • Get value by lodash filter in value array