Open
Description
When executing the symengine subs
on just basic types a callback to the python interpreter is make. A minimal example:
import symengine
x,y=symengine.symbols('x, y')
f=x*x+y*y/2
f.subs({x: 1.0, y: x}) # this triggers __instancecheck__ from abc.py
When profiling the expression (with cProfile + snakeviz) we get:
(the magenta block is the call back to python)
If the call back to the python interpreter can be avoided, the code is more efficient.