Updates:
Cc: ondrej.certik
Comment #6 on issue 1908 by asmeurer: mutable core
http://code.google.com/p/sympy/issues/detail?id=1908
I don't understand how you plan on achieving the efficient implementation
along with mutability. The
dictionaries that you are talking about have SymPy objects as their keys.
For example, x*y + 2*z is represented
as {Mul(x, y):1, z:2} in the Add. They have to be immutable. Are you
suggesting that it would be somehow
possible to rehash those objects once they are in a dictionary somewhere?
By the way, when I met Ondrej last summer and hacked on the core a bit, we
essentially came to the conclusion
that Add and Mul should just use the dictionary straight. The work is at
http://github.com/certik/sympyx/, and
the bits from last summer are on the handler branch (we also were looking
at having each class know how to
combine itself wrt to Add, Mul, etc.). I don't know to what extent it uses
dictionaries more than the current Add.
I do know that Ondrej was telling me that he tried using glib as a
replacement to Python dicts in Cython, only to
find that the Python dicts were faster. So this is definitely an efficient
implementation if we can get it to work.
Ondrej, do you remember any of this?
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.