#6199: Integer * int is slow
-------------------------------+--------------------------------------------
Reporter: fredrik.johansson | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: basic arithmetic | Keywords:
-------------------------------+--------------------------------------------
{{{
sage: a = 123
sage: b = 456
sage: c = 456r
sage: timeit("a*b")
625 loops, best of 3: 312 ns per loop
sage: timeit("a*c")
625 loops, best of 3: 2.99 µs per loop
}}}
Ditto for +, -. If I understand the code correctly, there always is a
coercion to Integer, which could be avoided. I'm not sure how to best fix
this since the ring operators are not implemented in the Integer class
itself.
For division and shift, see #6083 and #6118.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6199>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---