[LLVMdev] Is there a "callback optimization"?

Kenneth Uildriks kennethuil at gmail.com
Fri Jun 4 13:06:55 PDT 2010


On Fri, Jun 4, 2010 at 3:01 PM, Cornelius <c.r1 at gmx.de> wrote:
> Hi,
>> 1) Knowing when to perform specialization. If the call was not inlined
>> the function is probably big. Getting this wrong will generate *a lot*
>> of code for very small (if not negative) speed gain.
> Could you elaborate why just having (lots of) more code in the final
> executable will incur a performance _penalty_?
> I was thinking of something similiar, but for type-specializations of
> functions of a dynamicly-typed language, so that the frontend creates
> more than one function for each function in the sourcecode.

Having more executable code tends to reduce the locality of code,
especially if all that code is loaded and executed during the life of
the process (and if it is never loaded and executed, it would probably
have been eliminated as dead code).  Also, a larger process executable
takes longer to spin up (which is a Bad Thing in some situations).



More information about the llvm-dev mailing list