#16964: Speed up comparisons in QQbar
-------------------------------------+-------------------------------------
Reporter: gagern | Owner:
Type: defect | Status: positive_review
Priority: critical | Milestone: sage-6.5
Component: number fields | Resolution:
Keywords: variety qqbar cmp | Merged in:
singular | Reviewers: Vincent Delecroix
Authors: Martin von Gagern | Work issues:
Report Upstream: N/A | Commit:
Branch: | 3f4afef46ab6a042cb2678394031cb5c26d89b1a
u/vdelecroix/16964 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by gagern):
* status: needs_review => positive_review
Comment:
I like it. Thanks for the review!
The speed gain for the rational numbers appear to be due to the fact that
we no longer have to construct an algebraic number representation for the
real part. `a._value.real()` is a lot faster than `a.real()`:
{{{
sage: %timeit a._value.real()
1000000 loops, best of 3: 201 ns per loop
sage: %timeit a.real()
100000 loops, best of 3: 10.7 µs per loop
}}}
(I still hope that someone, some day, will make all this work here
obsolete by coming up with a better way to compare QQbar elements even if
they don't share a minpoly. No idea how, though.)
--
Ticket URL: <http://trac.sagemath.org/ticket/16964#comment:29>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.