Open NotBestLord opened 3 months ago
Solid work! IMO you have a perfect "single threaded" solution.
I wrote a multi-threaded version: https://github.com/SamAtMicrosoft/GravelerC
In theory, it'd be "8x faster" than what you have on an 8-processor system like mine. However, I used "secure random"* so it's not quite that.
*Because rand() won't give mathematically correct results on multiprocessor execution.
Moved from python to c (on windows).
See it here: https://github.com/NotBestLord/graveler.c
I achieved a 200 times increase in speed, from 5 min for 1000000, to 1.5 seconds for 1000000.