by api · 2mo ago · 0 comments
You can control this behavior with opt level "s" or "z" or "#[inline(never)]", but be aware that too little inlining can have large negative performance impacts.
It's hard to get inlining exactly right without profile guided optimization.
Across all languages with compilers that do it, and even with a mix of PGO data, a data set that brings another dynamic dispatch workflow into action might mess it all, by going into the else part of the optimization.