rust-blas icon indicating copy to clipboard operation
rust-blas copied to clipboard

Trait objects incur virtual calls

Open bluss opened this issue 9 years ago • 0 comments

Hi, I am probably moving away from rblas to blas-sys, I wanted to leave some observations anyway. I'm also happy to help with questions if you have any.

An issue that mostly only should be important for small matrices and vectors is that trait objects (for example the type &Matrix<T>) cause their method calls to be virtual function calls. This makes them uninlinable. This is a bit unfortunate, since all of .order(), cols(), rows(), as_ptr() and so on are called through the trait object.

bluss avatar Mar 11 '16 14:03 bluss