New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametrize 'modules' kwarg in lambdify benchmark #40

Merged
merged 1 commit into from Jun 28, 2017

Conversation

Projects
None yet
2 participants
@bjodah
Member

bjodah commented Jun 27, 2017

To partially address: sympy/sympy#12793

Don't know why asv isn't picking up on params

@bjodah bjodah changed the title from [WIP] Parametrize 'modules' kwarg in lambdify benchmark to Parametrize 'modules' kwarg in lambdify benchmark Jun 28, 2017

@bjodah

This comment has been minimized.

Show comment
Hide comment
@bjodah

bjodah Jun 28, 2017

Member

So here are the timings for creating the lambdified function:

               =========== =========

                  param1            

               ----------- ---------

                 ['math']   90.74ms 

                ['numpy']   85.93ms 

               =========== =========

and evaluating:

               =========== ==========

                  param1             

               ----------- ----------

                 ['math']   16.41μs  

                ['numpy']   399.72μs 

               =========== ==========

note: we expect performance conscious users to use numba or SymEngine.

Member

bjodah commented Jun 28, 2017

So here are the timings for creating the lambdified function:

               =========== =========

                  param1            

               ----------- ---------

                 ['math']   90.74ms 

                ['numpy']   85.93ms 

               =========== =========

and evaluating:

               =========== ==========

                  param1             

               ----------- ----------

                 ['math']   16.41μs  

                ['numpy']   399.72μs 

               =========== ==========

note: we expect performance conscious users to use numba or SymEngine.

@moorepants

This comment has been minimized.

Show comment
Hide comment
@moorepants

moorepants Jun 28, 2017

Member

Why would numpy be significantly slower?

Member

moorepants commented Jun 28, 2017

Why would numpy be significantly slower?

@moorepants

This comment has been minimized.

Show comment
Hide comment
@moorepants

moorepants Jun 28, 2017

Member

+1 to merge

Member

moorepants commented Jun 28, 2017

+1 to merge

@bjodah

This comment has been minimized.

Show comment
Hide comment
@bjodah

bjodah Jun 28, 2017

Member

Numpy functions will create numpy objects around Python's floats. So that's the extra overhead.

Member

bjodah commented Jun 28, 2017

Numpy functions will create numpy objects around Python's floats. So that's the extra overhead.

@bjodah bjodah merged commit f5044f7 into sympy:master Jun 28, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bjodah bjodah deleted the bjodah:lambdify-benchmark-param-modules branch Jun 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment