oxfordcontrol/Clarabel.rs

Julia vs Rust performance?

OliverEvans96 opened this issue · 3 comments

Hello and thank you for sharing this software with the world.

This is the only project I've enountered so far written in both Julia and Rust.

I'm curious whether you've compared the performance between the two implementations. Theoretically, they should be quite similar after Julia's precompilation, but I'm curious to hear what you've observed in practice.

Thanks,
Oliver

They are very close for most problems. Rust is marginally faster, and the difference is a little more apparent for very small problems. I suspect that some of the difference for small problems is down to implementation, possibly in the way that user settings are handled.

For bigger problems almost all of the time goes to matrix factorisation. For the Julia version that part is implemented in QDLDL.jl. The Rust version has a port of that package implemented as part of our distribution. Timing for those is very close - less than 5% difference I think.

We are working on a paper that will provide timing for both versions and comparisons to other solvers.

Paper here: https://arxiv.org/abs/2405.12762

You'll see from the results there that the Julia and Rust versions are generally very close.