Many of the sympy algorithms could be parallelized using parallel python.  That could lead to major speed improvements.  The computer I am writing this on has a Ryzen 9 5900x cpu with 12 cores and 24 threads.  I think that 4 cores and 8 threads is very common these days.

On 12/19/22 8:58 AM, Sam Brockie wrote:
> Put another way, what would be your preferred computer language if you
were SymPy starting again? There would obviously need to be an interface
to Python, but would you write the rest in C++?

There's the SymEngine project (https://github.com/symengine/symengine), which already does this :) SymPy itself, however, is, and should remain, a pure-Python computer algebra system.

I agree with what Aaron said above, SymPy does well in making things syntactically nice. From a pure performance perspective, SymPy and its trees of OOP objects is almost certainly the wrong data structure for performant computer algebra. Oscar Benjamin and I (with Aaron and Jason Moore also present for parts) have discussed the merits of hashcons (https://en.wikipedia.org/wiki/Hash_consing), which gives really neat inherent caching, smaller memory footprint, efficient expression traversal and topological sorting, and more. If there were to be a concerted effort to refactor the internals of SymPy in any way, my vote would strongly go towards using a different data structure for the implementation.

Sam
--
You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/fb160d08-978e-4002-ac7f-16635a313291n%40googlegroups.com <https://groups.google.com/d/msgid/sympy/fb160d08-978e-4002-ac7f-16635a313291n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/68376302-25a9-dfda-bdec-5a7b28a5b85d%40gmail.com.

Reply via email to