logo       

[sage-devel] multi_polynomial_element add/sub slower than mul?!?: msg#01557

Subject: [sage-devel] multi_polynomial_element add/sub slower than mul?!?
This is from a heavily hacked sage 2.3, so this might no longer be the
case.  (How do I run sage 2.5 on sage.math without building it myself?)

Below is a snip from `prun'.  Notice that add and sub are called about
as frequently as mul, but are significantly slower!  Any thoughts?

The calculations at hand are taking place in Integers(3**6)['x',
'y'].  I think that negates any "translation to Singular" speedups,
since Singular doesn't handle that ring.  Maybe this was all pyrexed?

Nick

PS.  I can provide the code if need be; it's not elegant :)

PPS.  Random element for multipolynomial rings is not implemented.

         747166 function calls in 50.847 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     1054   19.022    0.018   19.109    0.018 
multi_polynomial_element.py:174(_add_)
     1054    9.233    0.009   11.052    0.010 
multi_polynomial_element.py:178(_sub_)
     1040    8.502    0.008   13.388    0.013 
multi_polynomial_element.py:182(_mul_)
   137436    3.721    0.000    3.721    0.000 
{sage.rings.integer_mod.IntegerMod}
     2086    1.994    0.001    1.994    0.001 {hash}
   137436    1.884    0.000    6.726    0.000 integer_mod_ring.py:434(__call__)
    32952    1.824    0.000    2.021    0.000 
multi_polynomial_ring.py:677(greater_tuple_dp)

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to 
sage-devel-unsubscribe@xxxxxxxxxxxxxxxx
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/
-~----------~----~----~----~------~----~------~--~---




<Prev in Thread] Current Thread [Next in Thread>