On 10/3/07, Jason Grout <[EMAIL PROTECTED]> wrote:
>
> Does anyone have a clue why constructing subsets might be so slow?
>
> $ sage
> ----------------------------------------------------------------------
> | SAGE Version 2.8.5.1, Release Date: 2007-09-26                     |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
>
> sage: %time x=list(Subsets(25,5))
> CPU times: user 15.01 s, sys: 1.02 s, total: 16.03 s
> Wall time: 39.74
> sage: %time x=list(Subsets(25,5))
> CPU times: user 21.90 s, sys: 0.36 s, total: 22.26 s
> Wall time: 23.85
>
> In Mathematica:
> $ math
> Mathematica 6.0 for Linux x86 (32-bit)
> Copyright 1988-2007 Wolfram Research, Inc.
>
> In[1]:= Timing[Subsets[Range[25], {5}];]
>
> Out[1]= {0.028001, Null}
>
>
> Is it the calls to GAP that are consuming all the time?  If so, I'll try
> to submit a patch that does subset enumeration natively in Python.

Why do you say GAP is called?
??Subsets leads to
sage/combinat/subset.py
and ??Set leads to
sage/sets/set.py
I don't see GAP calls in these Python modules but maybe I'm missing something.

>
> Thanks,
>
> Jason
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to