❤RieBi&❤
✅ I don't undertand the error: capacity was less than the current size
Yeah so when multiple threads call the Add() at the same time, it would be essentially the same as doing it without parallel, but with parallel you also get overhead of syncing threads.
So I decided to do it myself:
The second one runs almost 2x as fast as the former one.
But I've got a shitty machine, so it might be even faster on your one.
The key here is that every thread operates on their own indices, and yep it's faster
17 replies