Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Chrome 88
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
Set spread num 54683.4 Ops/sec
Array from set 69217.9 Ops/sec
Filter 9342.8 Ops/sec
Create Set 70925.7 Ops/sec
For 7859.2 Ops/sec
Set array 42351.4 Ops/sec
Array set string 65307.2 Ops/sec
For string 3971.9 Ops/sec
Create set string 43854.1 Ops/sec
Filter string 2343.2 Ops/sec
Filter string small 144074.9 Ops/sec
Filter number small 124643.0 Ops/sec
Create set small string 253656.8 Ops/sec
Create set small 331417.3 Ops/sec
For string small 40030.4 Ops/sec
For small 54862.4 Ops/sec
Array set small string 259319.0 Ops/sec
Array set small 260009.0 Ops/sec
Spread set small 389814.1 Ops/sec
Spread set small string 356080.6 Ops/sec
Script Preparation code:
Tests:
  • Set spread num

  • Array set small

  • Array set small string

  • For small

  • For string small

  • Create set small

  • Create set small string

  • Filter number small

  • Filter string small

  • Filter string

  • Create set string

  • For string

  • Array set string

  • Set array

  • For

  • Create Set

  • Filter

  • Array from set

  • Spread set small

  • Spread set small string


;