#15792: A previously fixed regression has reappeared
-------------------------------+------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: performance | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------+------------------------
Comment (by SimonKing):
There is (again) some issue with overhead of the category framework:
{{{
sage: def test():
for p in prime_range(10000):
P = GF(p)['t','x','z']
....:
sage: %prun test()
939023 function calls (884893 primitive calls) in 8.130 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
9837 1.791 0.000 1.806 0.000
dynamic_class.py:324(dynamic_class_internal)
1229 0.623 0.001 6.659 0.005
polynomial_ring_constructor.py:569(_multi_variate)
13511/13510 0.298 0.000 3.230 0.000
category.py:435(__classcall__)
24580/3687 0.264 0.000 4.036 0.001 category.py:1522(<genexpr>)
1228 0.225 0.000 0.246 0.000
constructor.py:533(other_keys)
89702 0.200 0.000 0.200 0.000 {isinstance}
9836/1229 0.166 0.000 4.168 0.003 category.py:1467(_meet_)
19658/18423 0.151 0.000 0.468 0.000
category.py:1964(_make_named_class)
9826 0.142 0.000 2.343 0.000 category.py:466(__init__)
11054 0.132 0.000 0.195 0.000 {sorted}
7369 0.129 0.000 1.872 0.000
category_types.py:324(__init__)
11060 0.126 0.000 0.443 0.000 category.py:113(_join)
31942/23339 0.125 0.000 0.394 0.000
category.py:1358(is_subcategory)
1228 0.120 0.000 0.214 0.000
quotient_ring.py:408(__init__)
9826 0.120 0.000 0.233 0.000
category.py:1554(_flatten_categories)
11060/2457 0.120 0.000 4.456 0.002 category.py:1574(join)
2458/1229 0.113 0.000 4.578 0.004 homset.py:83(Hom)
9826 0.111 0.000 3.013 0.000
category.py:1015(_super_categories)
28258 0.110 0.000 0.168 0.000 weakref.py:223(__new__)
28259 0.101 0.000 0.155 0.000
category.py:667(_subcategory_hook_)
22113 0.095 0.000 0.131 0.000
category_types.py:206(_make_named_class_key)
9826 0.092 0.000 2.748 0.000
unique_representation.py:1006(__classcall__)
13521 0.091 0.000 1.898 0.000
dynamic_class.py:122(dynamic_class)
...
}}}
So, creation of dynamic classes and computation of the join of categories
takes a considerable amount of time.
Nicolas, do you think that this issue would vanish with your "more
functorial constructions"? Well, I am checking it now...
--
Ticket URL: <http://trac.sagemath.org/ticket/15792#comment:15>
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.