> The software search completed in 86 hours on my old 2 GHz Pentium 4 laptop.
This is an old article. Would be fun to see someone write a multithreaded solver and let it run on a modern CPU.
Or, make it a LeetCode problem. Within 24 hours you’d have someone come up with a mind boggling hyper-optimized solution using tricks you didn’t even know existed.
I compiled the code with minor changes on my M3 Macbook Air and it found the 19186 unique solutions in about 3hrs 15min, so ~9.2X speedup (over the 30hrs stated in the post). Would indeed be interesting to see how fast you can go with some optimization.
EDIT: I forgot to add -O3 the first time, with that the time to 19186 drops to under and hour, so over 30X speedup.
This is an old article. Would be fun to see someone write a multithreaded solver and let it run on a modern CPU.
Or, make it a LeetCode problem. Within 24 hours you’d have someone come up with a mind boggling hyper-optimized solution using tricks you didn’t even know existed.