Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Chrome 92
Mac OS X 10.14.6
Desktop
3 years ago
Test name Executions per second
Lodash intersection 319312.2 Ops/sec
Javascript Array intersection - filter 98532.3 Ops/sec
Javascript Array intersection - loop 153291.7 Ops/sec
Javascript Set intersection - filter 99804.6 Ops/sec
Javascript Set intersection - loop 418040.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash intersection

  • Javascript Array intersection - filter

  • Javascript Array intersection - loop

  • Javascript Set intersection - filter

  • Javascript Set intersection - loop