> For example:
> for i in range(80000):
>     print factor(i)
>

I just compiled 3.0.4.rc1 which has the new pyprocessing stuff:

(1) the i's in your example are way to small for pyprocessing to give an 
advantage due to the overhead of calling the other process, you could split 
up your function in 8 or 2 however and use pyprocessing on that.

(2) I found the documentation not as straight forward as I would like it to 
be, i.e. "parallel?" doesn't give any examples, the doctests are all in 
__init__ etc.

(3) this works nicely, good job everyone involved:

@parallel()
def f(x): 
  return factor(x)

list_of_integers = [randint(2^90,2^91) for _ in range(1000)]

%time
v = list( f( list_of_integers ) )
CPU time: 0.14 s,  Wall time: 3.52 s

%time
_ = [factor(n) for n in list_of_integers]
CPU time: 6.13 s,  Wall time: 6.28 s

Cheers,
Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to