[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Learning to write interpreted code
From: |
Ludovic Courtès |
Subject: |
Re: Learning to write interpreted code |
Date: |
Thu, 09 Aug 2007 17:07:35 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> So I went ahead and removed the `not' within the loop, rewriting
> `(if (not c) a b)' to `(if c b a)', and voilà:
>
> % cumulative self
> time seconds seconds name
> 8.88 1.19 1.08 xdr-basic-type-size
> 5.14 0.74 0.62 xdr-basic-type-type-pred
> 4.21 0.68 0.51 xdr-basic-type-encoder
> 3.74 1.64 0.45 +
> 3.74 0.45 0.45 eq?
> [...]
> Total time: 12.11 seconds (167/100 seconds in GC)
>
> An order of magnitude faster!
Actually, `statprof' is magnifying the effect on total run time since I
can hardly notice a 10% difference when running the thing without
statprof...
Sorry for the noise.
Ludovic.