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

Faster ldl decomposition #207

Merged
merged 3 commits into from
Aug 11, 2020
Merged

Faster ldl decomposition #207

merged 3 commits into from
Aug 11, 2020

Conversation

vbarrielle
Copy link
Collaborator

I've investigated performance differences between sprs-ldl and sprs-suitesparse-ldl. As it turns out, the bindings over the C library were faster, mostly because bounds checking had a high impact in a tight loop.

Fortunately, using an iterator could remove one of the offending bound checks, and I've been able to prove the other bounds check unnecessary regardless of the inputs, which means some unsafe indexing can be used.

This should help #199.

One bound check could be removed by leveraging iterators, but the other
required the use of unsafe code. It is however quite safe as the indices
are always written in the function in question, and a single assert at
the start of the function can check if the indices will be in bound.
For these checks it is quite clear they can be converted to usize, as
they were converted from usize before.
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.

1 participant