Closed cjordan closed 2 years ago
mmm, good spot, there are a certainly a lot of these quick hacks I did to satisfy the linter when I first started writing Rust. I'd like to find some time to fix these outstanding issues in a new point release, but I don't know when I'm going to be "finished" with this DI spike enough to be able to context switch back to Birli again.
Note for future self: another big optimization would be to pre-calculate all the uvws in the corrections.
There's some "low-hanging fruit" in the correction code. It's hard to know if changing these will make a difference, because the compiler might be smart enough already, but we should fix these anyway, and do a benchmark.
https://github.com/MWATelescope/Birli/blob/64c35b5644c0bc73245eb56012c757ee7314bc81/src/corrections.rs#L130 https://github.com/MWATelescope/Birli/blob/64c35b5644c0bc73245eb56012c757ee7314bc81/src/corrections.rs#L139 https://github.com/MWATelescope/Birli/blob/64c35b5644c0bc73245eb56012c757ee7314bc81/src/corrections.rs#L296
Note that
.clone()
on theRange
structs remains necessary, but those are very cheap. Otherwise.clone()
should be avoided as much as possible.