Skip to content

Alternative#11

Open
bolt12 wants to merge 4 commits intomasterfrom
alternative
Open

Alternative#11
bolt12 wants to merge 4 commits intomasterfrom
alternative

Conversation

@bolt12
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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