Just a stupid side-question:

On Sun, 4 Oct 2015, Victor Shoup wrote:

Also, now that NTL is threadsafe, I'm looking at making some of the low-level routines thread enhanced.

For up to 4 threads, I get close to linear speedup...but after that, it starts to degrade: at 16 threads I only get 8x speedup.

Isn't this what always happen with parallel computing? Computing in 1 thread takes for example 100 seconds. With 2 cores it takes 100/2+1=51, assuming that overhead for thread handling is 1 second. And at some point overhead will be too much, or memory IO will be bottleneck.

Now let's suppose that Sage has users A and B. A wants to compute one hard thing - say, factor one big integer. B wants to compute many things - say, factor 100 medium-size integers. For B it would be best to have no threading at all on lower level, just very simple upper level wrapper.

I have been asked to answer mostly type B questions, but sometimes also of type A.

 * * *

If I am right, there is no EASY parallel functions in Sage. Let G be a list of 1000 immutable graphs. How to run

C = [g.chromatic_number() for g in G]

in parallel? AFAIK we have no "parallel_apply()" or similar.

--
Jori Mäntysalo

Reply via email to