On Wed, Jul 03, 2013 at 02:06:33PM +0000, Simon King wrote:
> I found:
Thanks for investigating!
> - when number_field.all does
> `from totallyreal import enumerate_totallyreal_fields_prim`
> in line 16, then a univariate polynomial ring is created.
> - sage.rings.qqbar creates QQ['x'] in line 1893 and QQ['y'] in line
> 1895 and PolynomialRing(QQbar, 'x') in line 5623 and
> PolynomialRing(AA,'x') in line 5624.
> - rings.polynomial.complex_roots creates CC['x'] in line 355, apparently
> called when creating a QuadraticField
> (sage.rings.number_field.number_field line 738), namely
> `QQbar_I_nf = QuadraticField(-1, 'I', embedding=CC.gen())` in
> _init_qqbar. This line also results in the creation of CIF['x'].
I don't have an opinion here. How important is it to construct the
above polynomial rings at startup? How feasible is it to avoid it?
> - algebras.all does `from nil_coxeter_algebra import NilCoxeterAlgebra`,
> which results in `import kfpoly` in combinat.sf.hall_littlewood in
> line 32, which creates PolynomialRing(ZZ,'t').
Yikes. Fixing this is now #14866. This will save the creation of the
categories Algebras(ZZ) and friends.
> If I am not mistaken, during Sage startup,
> PolynomialRing_general.__init__ is called *only* in the
> afore-mentioned cases. That's not so often, actually, and thus
> probably not much of a problem.
Not so often indeed; but this still forces the creation of a bunch of
categories (Algebras(Fields()) and friends). Maybe we can save a bit.
Cheers,
Nicolas
--
Nicolas M. ThiƩry "Isil" <[email protected]>
http://Nicolas.Thiery.name/
--
You received this message because you are subscribed to the Google Groups
"sage-devel" 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-devel.
For more options, visit https://groups.google.com/groups/opt_out.