vfarid / v2ray-worker-sub

A Cloudflare's Worker script to gather free v2ray configs and mix them with worker in order to make them work over filtered networks.
GNU General Public License v3.0
715 stars 299 forks source link

Change getMultipleRandomElements function #34

Closed noobj2 closed 1 year ago

noobj2 commented 1 year ago

change the biased shuffle algorithm used in the function to Durstenfeld shuffle algorithm

vfarid commented 1 year ago

Thank you but current shuffeling algorithm is more efficient. Since we have CPU limit on worker, and we need performance better than randomness.