Skip to content
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

benchmarks for ode #69

Open
RituRajSingh878 opened this issue Apr 24, 2020 · 1 comment
Open

benchmarks for ode #69

RituRajSingh878 opened this issue Apr 24, 2020 · 1 comment

Comments

@RituRajSingh878
Copy link
Contributor

In the dsolve benchmarks, only one benchmark is present for now. I am trying to add dsolve benchmarks but I am a little bit confused that how should I start?
So can someone help me?

class TimeDsolve01:

For the dsolve, I am thinking to add benchmarks for all the hints one by one like for factorable-

def _make_ode_factorable():
    # eq = (f(x)**2-4)*(f(x).diff(x)+f(x))
    params = (f, x)
    return Eq((f(x)**2-4)*(f(x).diff(x)+f(x)), 0), params

class dsolve_factorable:

    def setup(self):
        self.ode, self.params = _make_ode_factorable()

    def time_dsolve(self):
        f, x = self.params
        dsolve(self.ode, x)

So should I proceed like this?
If yes, then I have a few questions-
If I add a benchmark for, let's say factorable method, so for that (like above), I will have to add at least one(maybe only one) equation to test. If I will add only one equation, then how we can say about slowing or speeding of a method based on only one equation.
And If we will add more than one equations to test, then maybe it can be too slow to benchmark the method.
If No, then how should I proceed?
CC @oscarbenjamin

@oscarbenjamin
Copy link
Contributor

As a starting point we should benchmark dsolve itself rather than the individual hints. Then we can see if changing the hints used leads to speed up or slowdown.

For the examples to pick I would aim for relatively common cases and examples that can be particularly fast or slow rather than trying to cover everything like the tests do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants