Jotting down stuffs
Posts tagged parallel
Project Euler Problem 12 – Faster brute-forcing using Parallel LINQ
Mar 21st
Building on the previous code, the CountFactor method would be a good candidate to be executed in parallel. It is doing the heavy calculation of finding the number of factor a number has, and it has no dependency on any other external factor.
Previously, when there is no PLINQ, we would have to do multithreading manually, and I would have probably came up with something like this: Read on to see the PLINQ code that managed to almost halve the time >