On Sunday, October 4, 2015, Jori Mäntysalo <jori.mantys...@uta.fi> wrote:
> On Sun, 4 Oct 2015, William Stein wrote: > > If I am right, there is no EASY parallel functions in Sage. >>> >> >> Type >> >> parallel? >> >> in Sage for a simple but very useful parallel decorator in Sage, that >> I addedabout 6 years. The API is slightly confusing, and it would be >> nice to have something better. But it's pretty easy to use >> > > Not hard, but as you said, could be better. I have no idea about how to > make simpler wrappers. > > Btw, it confuses timing: > > %timeit > @parallel > def f(n): return factor(2^n-1) > > n=210 > list(f(range(n,n+10))) > > said > > CPU time: 0.06 s, Wall time: 24.02 s > > and same with @parallel(ncpus=1) gave > > CPU time: 0.07 s, Wall time: 47.23 s > > Cpu time is by definition the time in the same process. There are a million ways to cause other processes to do stuff with the cpu that can't be measured as part of cpu time. The wall time should be accurate. > -- > Jori Mäntysalo > -- Sent from my massive iPhone 6 plus. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.