Skip to content
This repository was archived by the owner on Aug 21, 2020. It is now read-only.

Conversation

amitjamadagni
Copy link
Member

This aims at speeding up the current implementation of ODE solvers using FastAnonymous.jl.

WIP : Perform benchmarks, Add documentation, Update dependencies in README.

@amitjamadagni
Copy link
Member Author

Benchmarks :
Using Fast Anon : https://github.com/amitjamadagni/Notes-Notebooks/blob/master/Notebooks/ODE%20Solvers%20using%20Fast%20Anon.ipynb

Without Using Fast Anon : https://github.com/amitjamadagni/Notes-Notebooks/blob/master/Notebooks/ODE%20Solvers%20without%20Fast%20Anon.ipynb

Though there is a speed up with respect to ode45, not much efficiency is observed with ode78.

@acroy any thoughts on this would be helpful ! Thanks !

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try to do scale!(coeffs(op)*y, -im), which should save one copy and some multiplications.

@amitjamadagni
Copy link
Member Author

@acroy here are the results. There is a considerable speed up by the combination of @anon and scale!. Is this ready to go ?!

@acroy
Copy link
Contributor

acroy commented Dec 13, 2015

The speed up is nice, but mainly due to anon. Would be interesting to see a comparison with the other methods. I guess you haven't updated the docs etc?

@amitjamadagni
Copy link
Member Author

@acroy I have re run the benchmarks with a branch check (using REQUIRE file as diff) and here are the benchmarks

  1. Using fast anon : https://github.com/amitjamadagni/Notes-Notebooks/blob/master/Notebooks/Benchmarks%20using%20fast%20anon.ipynb
  2. Without fast anon : https://github.com/amitjamadagni/Notes-Notebooks/blob/master/Notebooks/Benchmarks%20without%20fast%20anon.ipynb

For smaller systems use of anon is not really useful as the timing efficiency decreases, but as the system size increases there is an increase in timing efficiency.

@acroy
Copy link
Contributor

acroy commented Dec 17, 2015

Thanks! For smaller systems (N<=6) the degradation of performance is quite significant, which is a bit disappointing (factor 100 or so matters). I guess the construction of the "fast anonymous function" takes too much time. Could you maybe try without anon, but with scale!?

@amitjamadagni
Copy link
Member Author

Here are the results without anon but scale!,

https://github.com/amitjamadagni/Notes-Notebooks/blob/master/Notebooks/Use%20of%20scale%20but%20not%20including%20Fast%20Anon.ipynb

seems like the original implementation is faster without anon and scale! for smaller systems, for larger systems anon with scale! is a better case (I must have mixed up the statements :(

@acroy
Copy link
Contributor

acroy commented Dec 17, 2015

It becomes much slower than the old version, which seems to be strange. Anyways, it is not clear what one should do now. We certainly don't want to spoil performance for small systems. Maybe we should leave this open until we understand the side-effects better?

@amitjamadagni
Copy link
Member Author

yup ! I guess we need a better understanding of the individual additions i.e., scale!, anon and without scale! and also on the combination of these additions.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants