Hacker News new | ask | show | jobs
by xentronium 4862 days ago
> First, not all applications need it, in many cases you want to do just a series of operations in a single starting number, and you don't need anything else, like if you are for example calculating a factorial, if you need only one factorial, it is useless to make it more parallel.

Sorry for nitpicking, but calculating factorial can certainly be parallelized. Easiest way to do this is multiply every n-th number on each core and then multiply n results together.

1 comments

I doubt that you can have a much increase in performance as cores increase unless you are calculating numbers with huge amount of bits.
Considering that factorial of 1e6 has about 18e6 bits (and factorial of 1e3 has 8.5e3 bits)? Yes, any factorial that doesn't have a huge amount of bits will be fast enough to calculate that there's not much point to parallelizing it.
as the size of the input to the procedure increases you will indeed be calculating with numbers with a huge amount of bits