sparsemat / sprs

sparse linear algebra library for rust
Apache License 2.0
386 stars 45 forks source link

Faster ldl decomposition #207

Closed vbarrielle closed 4 years ago

vbarrielle commented 4 years ago

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.