DataHaskell / dh-core

Functional data science
138 stars 23 forks source link

Refactoring `transpose` #62

Closed Magalame closed 5 years ago

Magalame commented 5 years ago

According to the benches on my machine I have a ~ x6 speedup.

The reason is that quotRem is a very expensive operation compared to simple multiplication and addition

ocramz commented 5 years ago

Very nice! Could you leave the original implementation in place and add a benchmark to compare the two?

ocramz commented 5 years ago

um, the tests are red because Travis cannot find the test logs. This is likely due to a behaviour change in the new stack.

Magalame commented 5 years ago

Very nice! Could you leave the original implementation in place and add a benchmark to compare the two?

No problem! Should I then move the new implementation to Statistics.Matrix.Fast?

Magalame commented 5 years ago

Also, I'm not too sure about how to fix Travis here :/

ocramz commented 5 years ago

@Magalame perhaps you could just comment out the cat ... lines in Travis and we'll think about it later :)

Magalame commented 5 years ago

Edited!

Magalame commented 5 years ago

I still need to include both transpose

Magalame commented 5 years ago

@ocramz I actually had a missing import there, seems like it's all good now!