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

Alternative #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Alternative #11

wants to merge 4 commits into from

Conversation

bolt12
Copy link
Owner

@bolt12 bolt12 commented Mar 1, 2020

This PR has type safe matrix construction primitives via linear maps semantics.

The new file called Alternative.hs when ready will substitute the one called Internal.hs.

I still need to refactor the other modules.

@bolt12
Copy link
Owner Author

bolt12 commented Mar 1, 2020

Now that the project compiles I ran the Benchmarks for the matrix composition and they are exactly the same. Since matrix composition does not use any of the Khatri-Rao and derivatives functions it doesn't suffer any performance impact!

However, just by running the Example.hs it's a lot slower than the previous version 😢 Just doing kr die die takes a lot of time to generate a Matrix of 36 rows...

Is there any way we can optimize the type safe matrix construction?

@snowleopard
Copy link

@bolt12 Yes, I suspected that this implementation would be slower.

One of the problems is that there is a lot of padding (padLeft/padRight) in the implementation of linearMap. I suggest you try to get rid of it.

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

Successfully merging this pull request may close these issues.

2 participants