#14711: Memleak when creating QuadraticField
-------------------------------------+-------------------------------------
       Reporter:  jpflori            |        Owner:  davidloeffler
           Type:  defect             |       Status:  needs_review
       Priority:  critical           |    Milestone:  sage-5.13
      Component:  number fields      |   Resolution:
       Keywords:  memleak, number    |    Merged in:
  field, QuadraticField              |    Reviewers:
        Authors:  Simon King         |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  05fb569cb132a8c89713021f1f4b25cd2dd7cb1c
  u/SimonKing/ticket/14711           |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by SimonKing):

 * cc: nthiery (added)


Comment:

 I studied the differences in parent creation during `sage -t --all` in
 more detail.

 __Absolute differences__

 Here are the 10 classes that have the most additional creations in the
 ticket branch compared with the public/sage-git/master branch (the list
 shows the absolute number of additional creations and the name of the
 class):
 {{{
 (19873, 'sage.rings.homset.RingHomset_generic')
 (16597, 'sage.categories.homset.Homset')
 (2839, 'sage.rings.finite_rings.integer_mod_ring.IntegerModRing_generic')
 (2270, 'sage.rings.homset.RingHomset_quo_ring')
 (2137, 'sage.rings.finite_rings.homset.FiniteFieldHomset')
 (1960, 'sage.rings.number_field.morphism.NumberFieldHomset')
 (1279, 'sage.sets.positive_integers.PositiveIntegers')
 (851, 'sage.combinat.tableau.Tableaux_all')
 (831, 'sage.modules.free_module_homspace.FreeModuleHomspace')
 (481, 'sage.rings.polynomial.polynomial_ring.PolynomialRing_dense_mod_p')
 }}}
 Here are the "bottom 10" classes. As you can see, there are parents for
 which we have considerably ''less'' creations with the ticket than
 without, which comes as a surprise to me:
 {{{
 (-57, 'sage.sets.family.LazyFamily')
 (-134, 'sage.combinat.words.words.Words_all')
 (-134, 'sage.combinat.permutation.StandardPermutations_all')
 (-136, 'sage.combinat.permutation.Permutations_set')
 (-142, 'sage.combinat.subset.Subsets_sk')
 (-158, 'sage.sets.non_negative_integers.NonNegativeIntegers')
 (-166, 'sage.combinat.cartesian_product.CartesianProduct_iters')
 (-170, 'sage.combinat.integer_list.IntegerListsLex')
 (-253, 'sage.combinat.skew_partition.SkewPartitions_rowlengths')
 (-3838, 'sage.sets.set.Set_object_enumerated')
 }}}

 __Relative differences__

 Here are the 10 classes that have the biggest relative increase in number
 of creations (ticket compared with master):
 {{{
 +14.67% sage.combinat.tableau.Tableaux_all
 +3.79% sage.combinat.skew_tableau.SemistandardSkewTableaux_all
 +1.00% sage.combinat.skew_tableau.SkewTableaux
 +1.00% sage.combinat.partition_tuple.PartitionTuples_all
 +0.91% sage.rings.homset.RingHomset_quo_ring
 +0.75% sage.categories.examples.sets_cat.PrimeNumbers_Facade
 +0.67%
 sage.combinat.crystals.affine.AffineCrystalFromClassicalAndPromotion
 +0.66% sage.groups.matrix_gps.homset.MatrixGroupHomset
 +0.64% sage.combinat.partition_tuple.PartitionTuples_level
 +0.60% sage.structure.list_clone_demo.IncreasingIntArrays
 }}}
 Here are the 10 classes with the biggest relative decrease in the number
 of creations:
 {{{
 -0.25%
 sage.combinat.crystals.kirillov_reshetikhin.KR_type_A2_with_category
 -0.25% sage.combinat.crystals.kirillov_reshetikhin.KR_type_A2
 -0.25% sage.categories.examples.finite_monoids.IntegerModMonoid
 -0.33% sage.sets.integer_range.IntegerRangeEmpty
 -0.33% sage.combinat.affine_permutation.AffinePermutationGroupTypeG
 -0.33% sage.combinat.affine_permutation.AffinePermutationGroupTypeC
 -0.38%
 sage.combinat.crystals.infinity_crystals.InfinityCrystalOfTableauxTypeD
 -0.39% sage.combinat.permutation.CyclicPermutations
 -0.40% sage.combinat.vector_partition.VectorPartitions
 -0.54% sage.combinat.composition_tableau.CompositionTableaux_all
 }}}

 __Conclusion__

 Even though the absolute differences in the creation of various kinds of
 homsets seem to be dramatic, the relative differences suggest that there
 is no serious problem here. There are only four classes that show an
 increase of at least 1%. Three of them are related with tableaux, that's
 why I add Nicolas to the ticket: Perhaps we want to change the cache for
 tableaux?

--
Ticket URL: <http://trac.sagemath.org/ticket/14711#comment:107>
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/groups/opt_out.

Reply via email to