Re: CopyOnWriteArrayList Collection.shuffle

2022-08-29 Thread Zelva Lia
System.out.println(cowl); > } > > > Some of the non-random access branches in Collections.java could be > updated to use List::replaceAll over ListIterator next/set. Once > Collections.java was using List::replaceAll you could then just wrap > CopyOnWriteArrayList in

CopyOnWriteArrayList Collection.shuffle

2022-08-23 Thread Zelva Lia
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 it