chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] read-byte, etc.


From: felix winkelmann
Subject: Re: [Chicken-users] read-byte, etc.
Date: Mon, 10 Apr 2006 06:52:07 +0200

On 4/6/06, Benedikt Rosenau <address@hidden> wrote:
> On Thu, Apr 06, 2006 at 08:41:55AM -0500, Alex Shinn wrote:
>
> > It looks like what the compiled C code ends up doing is just the
> > opposite of what you expected.  Binding read-char in a LET creates a
> > closure, and the code for accessing a closure reference seems to take
> > one extra level of indirection compared to a global reference.  Or
> > something :) But the difference is so small I wouldn't worry about it.
>
> The compiler assumes usual-integrations by default. So, it can resolve
> procedure calls at compile time. The level of indirection introduced by
> a LET harms the performance.

Generally, yes, but not for `read-char'.. The extra binding in the let
is just needed
for r5rs-compliance. On the other hand the latter only matters when defining
standard procedures. I recommend just removing it.
(But Alex' posted code already is the fastest possible method, so this
is just a remark on the side).


cheers,
felix




reply via email to

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