Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36
Chrome 85
Windows
Desktop
4 years ago
Test name Executions per second
unique by map, extract with deconstruct 1068.3 Ops/sec
obj UniqueBy, extract with for...in loop 177.3 Ops/sec
obj UniqueBy, extract with Object.values() 144.4 Ops/sec
unique by map, extract with ArrayFrom 738.4 Ops/sec
Script Preparation code:
Tests:
  • unique by map, extract with deconstruct

  • obj UniqueBy, extract with for...in loop

  • obj UniqueBy, extract with Object.values()

  • unique by map, extract with ArrayFrom