<div dir="ltr"><div dir="ltr"><div>Hello, when shuffling the CopyOnWrite list with the standard Collections.shuffle method, performance anomalies occur, due to the fact that it calls the set method, which copies the array each time, a possible solution (crutch) is a random comparator for sorting, so sorting in COW is redefined to its own sub - blocking implementation</div><div><br></div><div>Another problem with Collections.shuffle is that it's not exactly thread safe because it calls the size() method; and then iterates from it, also COW does not support modification inside the iterator (works on snapshots)</div><div><br></div><div><br></div><div>COWCollectionsShuffle      0,008 ops/ms</div><div>COWListRandomSort         1,089 ops/ms</div><div>syncListCollectionsShuffle  0,950 ops/ms</div><div><br></div></div></div>