My use case is as follows: I have 10 threads simultaneously writing to one data structure. The order of the elements in the data structure does not matter. All the elements are unique. I will only be doing a read from this data structure only once at the very end.
What would be the fastest native Java data structure to suit this purpose? From my reading, it seems Collections.synchronizedList might be the go to option?
Collections.synchronizedListwill work, but you still need to choose the backing list (e.g.ArrayList,LinkedList, etc.). Since elements are unique you could also try sets such asConcurrentSkipListSetwhich will enforce uniqueness (perhaps that's useful to you?). Performance all depends on your read/write patterns. The best way to know will probably be to test it yourself.