Well I tried

v = iter(Permutations(range(n)))

and the code compiled fine - but still ran slow.  To test the Petersen
graph (10 vertices), the compiled code took a wall time of  524.23 s,
and the uncompiled code, using

v=(p for p in Permutations(range(n)))

took a wall time of 492.22 s.  The CPU times were pretty much the same
for both.  I was hoping for a great speed up in the compiled code, but
I haven't got it yet.

-Alasdair

On Jan 31, 2:26 am, William Stein <wst...@gmail.com> wrote:
> On Fri, Jan 30, 2009 at 7:23 AM, Jason Grout
>
> <jason-s...@creativetrax.com> wrote:
> > Is there a reason you didn't use the less scary alternative below, other
> > than avoiding one function call?
>
> > v = iter(Permutations(range(n)))
>
> I didn't use that because I woke up a few minutes ago and I'm still groggy. 
> :-)
>
> William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to