#6199: Integer * int is slow
-------------------------------+--------------------------------------------
Reporter: fredrik.johansson | Owner: somebody
Type: defect | Status: needs_info
Priority: major | Milestone: sage-4.3.2
Component: basic arithmetic | Resolution:
Keywords: | Author:
Upstream: N/A | Reviewer:
Merged: | Work_issues:
-------------------------------+--------------------------------------------
Comment(by robertwb):
Multiplication on the left has less to gain, as it's going to try to call
int.__mul__ before falling back to this code. Do you think it's worth
doubling the general case penalty to support a smaller relative gain?
People who care about timings this small (e.g. mpmath) can follow such
rules, or ideally write Cython directly. I wrote a mode once that was
verbose about all the coercions used, I could resurrect that somewhere for
more easily tracking down stuff like this.
FWIW, I put {{{_mul_long}}} onto ModuleElement, not just RingElement. The
extra indirection needed to put it in coerce.pyx will make it at least 50%
or more slower, probably much more.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6199#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac?hl=en.