In gmane.comp.mathematics.sage.combinat.devel, you wrote:
>
>> This is interesting; we should profile this. Can you give a precise
>> description of how you constructed the algebra, and a typical
>> calculation you wanted to run?
>>
>> Permutations are written in Cython, and should be rather fast. On the
>> other hand, Weyl group elements could be slow (their action on the
>> root lattice, which is used for computing descents, could well be the
>> bottleneck). Polynomials are supposed to be fast, but I am not sure
>> about fraction fields.
>
> OK, it looks like permutations might be innocent and the real culprit
> might be e rational functions as suggested by Dima. I've discovered
> that there is a %profile command but I didn't work out how to use it.
%profile has nothing to do with profiling :)
You need to do something like this:
sage: def blah(n):
print n^100
....:
sage: %prun blah(10)
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
3 function calls in 0.000 CPU seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.000 0.000 <ipython console>:1(blah)
1 0.000 0.000 0.000 0.000 <string>:1(<module>)
1 0.000 0.000 0.000 0.000 {method 'disable' of
'_lsprof.Profiler' objects}
HTH,
Dima
--
You received this message because you are subscribed to the Google Groups
"sage-combinat-devel" group.
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-combinat-devel?hl=en.