Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Chrome 89
Windows
Desktop
3 years ago
Test name Executions per second
Get value in object by key 123820.8 Ops/sec
Get value by filtering array 1066.9 Ops/sec
Get value by mapping array 770.5 Ops/sec
Get value by forEach array 1126.4 Ops/sec
Get value by forEach lodash array 3175.9 Ops/sec
Get value by forEach object 139.2 Ops/sec
Get value by forEach in value object 133.4 Ops/sec
Get value by lodash filter in value object 121.7 Ops/sec
Get value by filter in value array 857.8 Ops/sec
Get value by lodash filter in value array 1865.7 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