andreasvarga / MatrixEquations.jl

Solution of Lyapunov, Sylvester and Riccati matrix equations using Julia
MIT License
79 stars 8 forks source link

Code review and cleanup #14

Closed dkarrasch closed 3 years ago

dkarrasch commented 3 years ago

This is an unsolicited :) review and cleanup of the LinearMap part. One major motivation was to add type parameters for the specific types of matrix fields, in order to have concrete types and make the compiler aware of the types of the struct fields. This follows a recommendation from the Julia performance tipps. Also, I tried to reduce the allocation of intermediate (mostly) vectors. Other changes are more of style nature, e.g., I noticed that the indentation was quite irregular, so I fixed that along the way. Feel free to ask for partial reversions or changes as you prefer.

Do you have some benchmarks to see if there are any improvements or regressions?

andreasvarga commented 3 years ago

I merged and corrected later some small errors. I think ME is now ready for a version bump.

dkarrasch commented 3 years ago

As you like. I started with the Adjoint stuff, but I think it will be only non-user-facing changes, unless people rely on your new *Map-types. But since these are new, users probably won't.