Changes between Version 2 and Version 5 of Ticket #18426


Ignore:
Timestamp:
10/09/20 13:41:12 (20 months ago)
Author:
slelievre
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18426

    • Property Cc slelievre added
  • Ticket #18426 – Description

    v2 v5  
    22
    33Upon creating a root system, say of type B3, this line:
    4 {{{#!python
     4{{{
    55self.dual = RootSystem(self._cartan_type.dual(), as_dual_of=self);
    66}}}
     
    1212sage: import gc
    1313sage: gc.collect()
    14 91
     14349
    1515sage: pre = {id(a) for a in gc.get_objects()}
    1616sage: get_memory_usage()
    17 1022.7890625
    18 sage: for n in range(5,3000):
    19     RS = RootSystem(['A',n])
    20 ....:     
     178697.9453125
     18sage: for n in range(5, 3000):
     19....:     RS = RootSystem(['A', n])
     20....:
    2121sage: gc.collect()
    22 0
     22106
    2323sage: get_memory_usage()
    24 1031.359375
     248703.08984375
    2525sage: post = Counter(str(type(a)) for a in gc.get_objects() if id(a) not in pre)
    26 sage: [p for p in post.iteritems() if p[1] > 2000]
    27 [("<class 'weakref.KeyedRef'>", 8985),
    28  ("<class 'sage.combinat.root_system.type_A.CartanType'>", 2994),
    29  ("<class 'sage.combinat.root_system.root_system.RootSystem'>", 5990),
    30  ("<type 'dict'>", 6012),
    31  ("<type 'tuple'>", 29952)]
    32 }}}
     26sage: sorted([p for p in post.items() if p[1] > 2000])
     27[("<class 'dict'>", 6123),
     28 ("<class 'sage.combinat.root_system.root_system.RootSystem'>", 5985),
     29 ("<class 'sage.combinat.root_system.type_A.CartanType'>", 2991),
     30 ("<class 'tuple'>", 30460),
     31 ("<class 'weakref.KeyedRef'>", 9003)]
     32 }}}