#9540: Testing whether a Gaussian integer is in ZZ is extremely slow
-------------------------------------+--------------------------
Reporter: fredrik.johansson | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone:
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------------+--------------------------
Comment (by kedlaya):
By way of comparison:
{{{
sage: %timeit z in ZZ
The slowest run took 7.79 times longer than the fastest. This could mean
that an intermediate result is being cached.
10000 loops, best of 3: 58 µs per loop
sage: %timeit z.is_integer() #should return the same answer
The slowest run took 82.03 times longer than the fastest. This could mean
that an intermediate result is being cached.
10000000 loops, best of 3: 72.7 ns per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/9540#comment:2>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.