5
lorentz
7d

Boy I sure hope Rust / LLVM's devirtualization pass is as good as its infamy suggests!

https://devrant.molodetz.nl/preview...

Comments
  • 3
    Oh

    Oh no...
  • 3
    I gave up on this particular refactoring angle because I noticed a much faster way to solve the immediate problem I was having, but I do actually want to return to it and figure out how much of a performance impact it has, because it would be really neat to speed up compilation and also to be able to separate out the client's and server's distinct implementations of certain shared concerns while retaining the shared interface.

    Ideally, a debug build should be massively parallel, almost file-by-file, with no type's structure depending on the fields of any other, and a release build should be fully static, with virtual calls exclusive to heterogenous containers (of which at runtime there are like 3 in the whole system). I know C++ could do this, but Rust doesn't provide as much type information to LLVM so it benefits significantly less from these high level optimizations specifically.
Add Comment