Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Chrome 97
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
finding item using find with Object.values 854.4 Ops/sec
finding item using find with Object.keys 972.6 Ops/sec
looping with for..in 1080.7 Ops/sec
finding item using find without Object.values (accessing entities using the ids array) 1547.8 Ops/sec
using the itemIdByUuid "projection" we created 1684567.6 Ops/sec
Script Preparation code:
Tests:
  • finding item using find with Object.values

  • finding item using find with Object.keys

  • looping with for..in

  • finding item using find without Object.values (accessing entities using the ids array)

  • using the itemIdByUuid "projection" we created


;