chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] benchmark mode misteries


From: felix winkelmann
Subject: Re: [Chicken-users] benchmark mode misteries
Date: Mon, 3 Mar 2008 09:38:42 +0100

On Sat, Mar 1, 2008 at 9:20 AM, Michele Simionato
<address@hidden> wrote:

>  I am just curious to know which optimization I am breaking and
>  why the compiler cannot be smart enough. Any idea?

In the first case, the compiler can see that all references to fac
are call sites: the value of "fac" is only used in positions where
the compiler can be absolutely sure it is a call. In the second case
the value of fac is passed to "call" (and the compiler is not clever
enough to trace the value through the execution of "call" - this
would need flow analysis). So in the first case, a specialized
representation of fac can be used ("direct" lambdas, i.e. direct-style
calls which are very fast).

Compiling with "-debug o" and/or "-debug 7" can also be very instructive.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]