linfa
linfa copied to clipboard
use rayon to speed up linfa-logistic
This PR speeds up a test logistic regression by a factor of two on my laptop, from 2 minutes and 13 seconds to just 1 minute.
Hi, thanks. Would you add some benches then attach the results here in the PR? See #263 or #261 as examples.
Alas, I implemented a benchmark, but it seems that the limiting step (if you have many more samples than "features") is a matrix multiply that I didn't parallelize. And moreover I don't see a good way to make ndarray do the multiply in parallel. :(
I'll leave this open for now, in case someone wants to use it as a starting point for doing this properly, but feel free to close when you wish to.