
On 10.10.2011. 8:22, Jeffrey Lee Hellrung, Jr. wrote:
+1, my thoughts exactly, Beman. Can anyone provide any links to a case study or something similar investigating the effects of forcing inlining? I'm definitely interested to see what real effects this could have.
Well Mathias has already outlined the major reasons. That seems like quite sufficient documentation. If a developer is performance conscious and notices one the outlined problems in the codegen he can simply try the force inline approach and see if it helps. I don't see where a problem could lie there or a reason for wasting too much time discussing something so simple. Otherwise one could question any existing part of the language by pointing that it could be abused (unintentionally or otherwise). I don't know of a "study" related to forceinline, but in this case it arose as a (partial) solution to the problems listed by Mathias in the development of the NT2 (and thuse Boost.SIMD and Boost.Dispatch) libraries. These were discussed on the NT2 dev mailing list an on #nt2 so maybe someone can present logs of these discussions if you are interested... -- "What Huxley teaches is that in the age of advanced technology, spiritual devastation is more likely to come from an enemy with a smiling face than from one whose countenance exudes suspicion and hate." Neil Postman