Re: [sympy] Lambdify - performance using sympy as the module

2021-09-15 Thread Davide Sandona'
> > What are the results you get from these? For me the last one is > slightly faster, which makes sense because the inputs don't have to be > converted to SymPy Floats first. > This chart summarizes my findings. Each dot represents the evaluation time with the specified module + data type. I gues

Re: [sympy] Lambdify - performance using sympy as the module

2021-09-15 Thread Aaron Meurer
On Wed, Sep 15, 2021 at 2:36 AM Davide Sandona' wrote: > What are the results you get from these? For me the last one is >> slightly faster, which makes sense because the inputs don't have to be >> converted to SymPy Floats first. >> > > This chart summarizes my findings. Each dot represents the

Re: [sympy] Lambdify - performance using sympy as the module

2021-09-15 Thread Oscar Benjamin
On Tue, 14 Sept 2021 at 23:12, sandona...@gmail.com < sandona.dav...@gmail.com> wrote: > Hello, > let's say I'd like to numerically evaluate a single sympy function over an > array using sympy as the module. Curiously, passing in regular Python's > float numbers makes the evaluation much faster th

Re: [sympy] Lambdify - performance using sympy as the module

2021-09-15 Thread Oscar Benjamin
On Wed, 15 Sept 2021 at 13:41, Oscar Benjamin wrote: > On Tue, 14 Sept 2021 at 23:12, sandona...@gmail.com < > sandona.dav...@gmail.com> wrote: > >> Hello, >> let's say I'd like to numerically evaluate a single sympy function over >> an array using sympy as the module. Curiously, passing in regul

Re: [sympy] Lambdify - performance using sympy as the module

2021-09-15 Thread Davide Sandona'
Thanks Oscar for the wonderful clarification! I rerun my code with SYMPY_USE_CACHE=no, now the results make much more sense. [image: lambdify-no-cache.png] Davide. Il giorno mer 15 set 2021 alle ore 15:14 Oscar Benjamin < oscar.j.benja...@gmail.com> ha scritto: > > On Wed, 15 Sept 2021 at 13: