lodash xor vanila toggle

lodash xor for toggling value vs es6 includes if else
one year ago
User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0
Test name Executions per second
lodash xor implemantation 28446.6 Ops/sec
alternative with Sets 195014.3 Ops/sec
Script Preparation code:
  • lodash xor implemantation

  • alternative with Sets

Open this result on MeasureThat.net