3 ms·
Note that this is about slow compilation, not execution. IMHO if the output also becomes much faster, the tradeoff is reasonable. It would be interesting to kno
by userbinator 9y ago
Note that this is about slow compilation, not execution. IMHO if the output also becomes much faster, the tradeoff is reasonable. It would be interesting to know how much runtime performance changed, and in what direction, by not inlining.
On the other hand, the huge difference in compile times suggests there may be a hidden quadratic or higher complexity algorithm somewhere in the code path of the compiler when inlining is performed.
- amyjess 9y ago> IMHO if the output also becomes much faster, the tradeoff is reasonable. The output may be faster in terms of CPU cycles, but the executable will have a larger memory footprint, which can cause performance problems when it comes to swapping, eviction of file-backed pages, etc.
- colanderman 9y agoDon't forget instruction cache misses.
- Animats 9y agoRight. Of course turning off forced inlining will speed up compilation. The article is completely silent about what it does to run time. This is an unusual case, in that it involves code with SIMD instructions. Out of line calls usually mean the arguments have to be put on the stack, then loaded into the SIMD registers. Inlining opens up the optimization possibility of not doing that. It's not clear what he's writing, but from the math it sounds like a physics engine for animation or games.
- amagumori 9y agohe's a senior developer at unity.
- blt 9y agoThe function call overhead for an SVD-based matrix inverse should be tiny. Maybe if they are inverting 4x4 matrices, it's measurable. Inlining can give huge speedups but it should not be applied to every function without thought.