[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Speeding up bit-vector operation (using iset)
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Speeding up bit-vector operation (using iset) |
Date: |
Wed, 17 Mar 2010 15:37:12 +0100 |
On Wed, Mar 17, 2010 at 1:18 PM, Alex Shinn <address@hidden> wrote:
>
> At 2^26 bits each I would say these are *huge* bit-vectors.
>
>> (do
>> ((i 0 (+ 1 i)))
>> ((= i 10))
>> (bit-vector-and s1 s2)
>> (bit-vector-ior s1 s2)
>> (bit-vector-and s1 (bit-vector-nand s2)))
>
> These operations are generating three new huge bit-vectors
> on each iteration, so you're spending all your time in GC
> (and the loop has no effect).
I don't think this is completely true. GC-time is quite considerable,
but the loops
in iset.c are not tight enough for so many iterations (which is mostly
caused by slow XXXvector operations that require a full CPS call).
Using bignums (the new "standalone" version, which unfortunately has a bug
in `random') or crunch would be an interesting exercise.
cheers,
felix