Re:Multi-core scaling: it’s not multi-threaded
by speeder on Thursday February 21, 2013 @04:36PM
(#5260623)
I doubt that you can have a much increase in performance as cores increase unless you are calculating numbers with huge amount of bits.
Re:Multi-core scaling: it’s not multi-threaded
by tbrownaw on Thursday February 21, 2013 @05:14PM
(#5260872)
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.
Re:Multi-core scaling: it’s not multi-threaded
by PurplePanda on Thursday February 21, 2013 @05:09PM
(#5260829)
as the size of the input to the procedure increases you will indeed be calculating with numbers with a huge amount of bits
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.