rust-gpu
rust-gpu copied to clipboard
Refactoring & improvements to algorithmic complexity of inline.rs.
inline.rs was a sore spot for me reading the codebase because of how many TODOs and quadratic algorithms it had sitting there.
Looking at it, I was able to see some nicer algorithms trying to poke out. Also a little bit more uniformity for doing the same stuff (like finding variable split points), less cloning, and more caching :)
Tests aren't affected at all, which I'd consider a success.
P.S. Idle hands shave yaks, or so they say.
I've tried to explain what exactly I am doing in each commit, and the rationale behind it. This is a second draft, but if some parts seem unclear or I missed something simple, be sure to tell.
Updated the MR and resolved conflicts, @eddyb do you wish to take a look?