#12615: sign(integer) is horribly slow
------------------------------------+---------------------------------------
Reporter: zimmerma | Owner: AlexGhitza
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: basic arithmetic | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by robertwb):
I don't think that sign(x) can be made much faster than in #13933 (vs.
abs, which is a builtin function), but a.sign() is *much* faster now. It
also scales better :)
{{{
sage: a = 3^2^20
sage: %timeit a//abs(a)
625 loops, best of 3: 129 µs per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12615#comment:11>
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.