[Top][All Lists]
[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
- Re: [Chicken-users] read-byte, etc., Hans Bulfone, 2006/04/03
- Re: [Chicken-users] read-byte, etc., Alex Shinn, 2006/04/04
- Re: [Chicken-users] read-byte, etc., Hans Bulfone, 2006/04/06
- Re: [Chicken-users] read-byte, etc., F. Wittenberger, 2006/04/06
- Re: [Chicken-users] read-byte, etc., Alex Shinn, 2006/04/06
- Re: [Chicken-users] read-byte, etc., Benedikt Rosenau, 2006/04/07
- Re: [Chicken-users] read-byte, etc.,
felix winkelmann <=
- Re: [Chicken-users] read-byte, etc., Hans Bulfone, 2006/04/19
- Re: [Chicken-users] read-byte, etc., felix winkelmann, 2006/04/20