linfa icon indicating copy to clipboard operation
linfa copied to clipboard

use rayon to speed up linfa-logistic

Open droundy opened this issue 1 year ago • 1 comments

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.

droundy avatar Jul 09 '24 23:07 droundy

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.

droundy avatar Jul 10 '24 20:07 droundy