Hi Pierre-Marie,
On 09/26/2017 11:30 AM, Pierre-Marie de Rodat wrote:
On 09/25/2017 02:47 PM, Duncan Sands wrote:
it looks like this is in essence inlining the run-time library routine. In
which case, shouldn't you only do it if inlining is enabled? For example, it
seems rather odd to do this if compiling with -Os.
Actually, measurements showed that this instance of inlining is a win for both
performance and code size, so it’s a good candidate even for -Os. Note that we
inline string concatenation routines for the same reason.
thanks for explaining. I think it merits a comment in the code though.
By the way, why not always do this "inlining", even when not optimizing?
This is a trick question, because when you answer "because XYZ" I will then
reply "but XYZ is a common reason that people disable inlining when optimizing,
so shouldn't you only do it when inlining is enabled?" :)
Best wishes, Duncan.
PS: I'm imagining XYZ is related to a better debugging experience.