Re: [sympy] Faster symbolics

2022-04-19 Thread Aaron Meurer
On Tue, Apr 19, 2022 at 7:31 AM Ondřej Čertík wrote: > > Hi Alan! > > Indeed, parallelism is another avenue. SymEngine can be compiled in a > "thread-safe" mode, which enables to then use it in parallel. It's slightly > slower, since the reference counted pointer becomes an atomic (so the idea

Re: [sympy] Faster symbolics

2022-04-19 Thread Ondřej Čertík
Hi Alan! Indeed, parallelism is another avenue. SymEngine can be compiled in a "thread-safe" mode, which enables to then use it in parallel. It's slightly slower, since the reference counted pointer becomes an atomic (so the idea below about not using reference counted pointers might help here

Re: [sympy] Faster symbolics

2022-04-19 Thread Alan Bromborsky
For speed up how about parallel processing?  Looking at Ryzen processors 16 cores and 32 threads are quite affordable these days.  Is parallel python mature code these days? On 4/18/22 11:45 PM, Ondřej Čertík wrote: Hi, I am CCing the symengine list also. Let me say a few words about the

Re: [sympy] Faster symbolics

2022-04-18 Thread Ondřej Čertík
Hi, I am CCing the symengine list also. Let me say a few words about the design and goals of SymEngine. It's a result of many years of experience with SymPy and implementing high performance code in general. The goal is the fastest possible symbolic manipulation. So we do not want to introduce

Re: [sympy] Faster symbolics

2022-04-18 Thread Aaron Meurer
I think the only way is to move SymPy away from its current approach of automatically evaluating things when expressions are constructed. To take a concrete example from https://github.com/sympy/sympy/issues/10800, consider this expression: a = 2*Integral(sin(exp(x)), (x, 1, oo))+2*Si(E) This

Re: [sympy] Faster symbolics

2022-04-18 Thread Aaron Meurer
On Thu, Apr 14, 2022 at 5:01 PM Oscar Benjamin wrote: > > On Thu, 14 Apr 2022 at 23:22, Aaron Meurer wrote: > > > > On Thu, Apr 14, 2022 at 3:12 PM Oscar Benjamin > > wrote: > > > > > > On Thu, 14 Apr 2022 at 20:30, Aaron Meurer wrote: > > > > > > > > On Thu, Apr 14, 2022 at 12:26 PM Oscar

Re: [sympy] Faster symbolics

2022-04-18 Thread S.Y. Lee
How could the future of the fast expression evaluation be suggested? Would it be making the assumption system faster? Or would it be choosing carefully between 'easy assumptions' and 'hard assumptions' with time complexity analysis? Or would it be not using assumption system at all, but may be

Re: [sympy] Faster symbolics

2022-04-17 Thread Oscar Benjamin
On Sun, 17 Apr 2022 at 15:02, David Bailey wrote: > > On 17/04/2022 13:00, Oscar Benjamin wrote: > > On Sun, 17 Apr 2022 at 11:47, David Bailey wrote: > >> > >> I am curious as to how much of the difference in speed between SymPy and > >> SymEngine you think is attributable to the lack of the

Re: [sympy] Faster symbolics

2022-04-17 Thread David Bailey
On 17/04/2022 13:00, Oscar Benjamin wrote: On Sun, 17 Apr 2022 at 11:47, David Bailey wrote: On 16/04/2022 12:18, Oscar Benjamin wrote: Yes, this does work differently in SymEngine compared to SymPy. If SymPy could be changed to work the same way then it could also be a lot faster (without

Re: [sympy] Faster symbolics

2022-04-17 Thread Oscar Benjamin
On Sun, 17 Apr 2022 at 11:47, David Bailey wrote: > > On 16/04/2022 12:18, Oscar Benjamin wrote: > > Yes, this does work differently in SymEngine compared to SymPy. If > > SymPy could be changed to work the same way then it could also be a > > lot faster (without needing to be rewritten in C++).

Re: [sympy] Faster symbolics

2022-04-17 Thread David Bailey
On 16/04/2022 12:18, Oscar Benjamin wrote: Yes, this does work differently in SymEngine compared to SymPy. If SymPy could be changed to work the same way then it could also be a lot faster (without needing to be rewritten in C++). SymEngine has the same overall design as SymPy but makes

Re: [sympy] Faster symbolics

2022-04-16 Thread Oscar Benjamin
On Sat, 16 Apr 2022 at 02:53, Isuru Fernando wrote: > > Hi Oscar, > > Here's a few things that are different in SymEngine than SymPy. > > > As an example it would be trivial in SymPy to make substitutions > involving large expressions and many replacements much faster with a > small redesign. The

Re: [sympy] Faster symbolics

2022-04-15 Thread Isuru Fernando
Hi Oscar, Here's a few things that are different in SymEngine than SymPy. > As an example it would be trivial in SymPy to make substitutions involving large expressions and many replacements much faster with a small redesign. The problem though is backwards compatibility: each expression class

Re: [sympy] Faster symbolics

2022-04-14 Thread Oscar Benjamin
On Thu, 14 Apr 2022 at 23:22, Aaron Meurer wrote: > > On Thu, Apr 14, 2022 at 3:12 PM Oscar Benjamin > wrote: > > > > On Thu, 14 Apr 2022 at 20:30, Aaron Meurer wrote: > > > > > > On Thu, Apr 14, 2022 at 12:26 PM Oscar Benjamin > > > wrote: > > > > > > > > As an example it would be trivial in

Re: [sympy] Faster symbolics

2022-04-14 Thread Aaron Meurer
On Thu, Apr 14, 2022 at 3:12 PM Oscar Benjamin wrote: > > On Thu, 14 Apr 2022 at 20:30, Aaron Meurer wrote: > > > > On Thu, Apr 14, 2022 at 12:26 PM Oscar Benjamin > > wrote: > > > > > > As an example it would be trivial in SymPy to make substitutions > > > involving large expressions and many

Re: [sympy] Faster symbolics

2022-04-14 Thread Oscar Benjamin
On Thu, 14 Apr 2022 at 20:30, Aaron Meurer wrote: > > On Thu, Apr 14, 2022 at 12:26 PM Oscar Benjamin > wrote: > > > > As an example it would be trivial in SymPy to make substitutions > > involving large expressions and many replacements much faster with a > > small redesign. The problem though

Re: [sympy] Faster symbolics

2022-04-14 Thread Aaron Meurer
On Thu, Apr 14, 2022 at 12:26 PM Oscar Benjamin wrote: > > On Thu, 14 Apr 2022 at 18:16, Tirthankar Mazumder > wrote: > > > > On Thursday, April 14, 2022 at 10:04:28 PM UTC+5:30 Oscar wrote: > >> > >> On Tue, 12 Apr 2022 at 19:26, Matthias Köppe wrote: > >> > >> > - status and plans regarding

[sympy] Faster symbolics

2022-04-14 Thread Oscar Benjamin
On Thu, 14 Apr 2022 at 18:16, Tirthankar Mazumder wrote: > > On Thursday, April 14, 2022 at 10:04:28 PM UTC+5:30 Oscar wrote: >> >> On Tue, 12 Apr 2022 at 19:26, Matthias Köppe wrote: >> >> > - status and plans regarding SymEngine >> >> I don't know about the status of SymEngine. I can't say