Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36
Chrome 101
Windows
Desktop
2 years ago
Test name Executions per second
Set spread num 98991.0 Ops/sec
Array from set 105153.7 Ops/sec
Filter 10189.6 Ops/sec
Create Set 106939.6 Ops/sec
For 8595.1 Ops/sec
Set array 56370.1 Ops/sec
Array set string 101988.8 Ops/sec
For string 4202.7 Ops/sec
Create set string 54206.8 Ops/sec
Filter string 2420.5 Ops/sec
Filter string small 158351.0 Ops/sec
Filter number small 158707.0 Ops/sec
Create set small string 472821.3 Ops/sec
Create set small 545208.4 Ops/sec
For string small 43887.9 Ops/sec
For small 55586.0 Ops/sec
Array set small string 391145.0 Ops/sec
Array set small 450028.8 Ops/sec
Spread set small 533527.7 Ops/sec
Spread set small string 442572.0 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


;