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
make sparse * sparse = dense mod p like 50 frickin' times faster. #4753
Comments
comment:1
Attachment: trac_4753-part1.patch.gz |
comment:3
One issue is that in the patch, it should actually be
Also, I'm curious as to where the big speedup comes from? For example,
Is it because you have a faster, more specialized underlying data structure? Wouldn't it make more sense to add an optimized |
comment:5
This code wasn't ready for review yet -- William posted an initial patch after quickly writing some code in his office, and I'm going to clean it up and implement a few more things and post a patch tomorrow ... |
comment:6
Replying to @craigcitro:
I saw the patch, changed the subject, but did ping William about whether this code was supposed to be reviewed yet and didn't get an answer, so my bad :( Cheers, Michael |
comment:7
Definitely not. Much of the time would likely be spent with setting and inserting entries in the sparse output, which is an insanely expensive datastructure compared to the super-fast dense data structure. That said, obviously a fast sparse*sparse = sparse should also be implemented, which would just be an easy cut and paste from Matrix_rational_sparse. -- william |
comment:8
I'm adding a second patch, which does two things:
Now it's ready for review. |
Attachment: trac_4753-part2.patch.gz |
comment:9
As Michael pointed out, it wouldn't hurt to have some comparison code. BEFORE:
AFTER:
|
comment:10
This patch set causes one doctest failure:
Cheers, Michael |
Attachment: trac_4753-part3.patch.gz |
comment:11
Ok, new patch should fix that. The problem was fairly straightforward: we didn't think to test in the case of |
comment:12
i applied all three patches to a clean sage-3.2.3 on sage.math and doctested matrix and got:
|
comment:13
Ok, problem solved. The issue is that I wised up, and tested |
comment:14
Attachment: trac_4753-part4.patch.gz |
comment:15
Merged all four patches in Sage 3.3.alpha0 Cheers, Michael |
title says it all
CC: @craigcitro
Component: linear algebra
Issue created by migration from https://trac.sagemath.org/ticket/4753
The text was updated successfully, but these errors were encountered: