You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating multivariate polynomials from dictionaries is slow and grinds to a halt around 100k terms. In particular, it seems to grow worse than O(N^2). Unpickling falls precisely into this trap.
With my C function profiler from #16038 we see that the problem is in p_Add_q, which presumably also does some sorting:
It's doing things naively, i.e. it adds terms up instead of building the list manually. Doing the list building ourselves would require reading a bit of Singular code to make sure we're doing it right™.
Well, could the right thing to do be anything else but (1) sorting the dictionary items according to the term ordering, or (2) sorting the dictionary items according to the inverse term ordering, before feeding them to p_Add_q?
Creating multivariate polynomials from dictionaries is slow and grinds to a halt around 100k terms. In particular, it seems to grow worse than
O(N^2)
. Unpickling falls precisely into this trap.With my C function profiler from #16038 we see that the problem is in
p_Add_q
, which presumably also does some sorting:CC: @malb @burcin @sagetrac-jkeitel @simon-king-jena
Component: algebra
Issue created by migration from https://trac.sagemath.org/ticket/16040
The text was updated successfully, but these errors were encountered: