#19351: Optimize initialization of RealIntervalFieldElement
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.9
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/19351 | 40ff5697119f0e9e425dabd195395ac18e41dbc1
Dependencies: #19330 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:5 vdelecroix]:
> `field.zero()` should be faster than `field(0)` (not much though).
I intentionally use `field(0)` because I need to mutate the number.
`field.zero()` is probably cached and that would break things.
Ideally, I would use `ComplexNumber.__new__()` but that's not properly
supported. The way I'm writing `RealIntervalFieldElement.__cinit__()`
should be done for more element classes. But I didn't feel like rewriting
also the `ComplexNumber` constructor here.
--
Ticket URL: <http://trac.sagemath.org/ticket/19351#comment:6>
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.