[Top][All Lists]

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

Re: [Chicken-users] String compression?

From: felix winkelmann
Subject: Re: [Chicken-users] String compression?
Date: Thu, 21 Dec 2006 20:03:29 +0100

On 12/21/06, Graham Fawcett <address@hidden> wrote:
Hi folks,

Does anyone have code for compressing strings using zlib, lzo or some
other common llibrary/algorithm? I seem to have z3 working, but the
performance is really terrible -- I may be doing something wrong, to
be fair, the documentation is a bit light.

I'm getting ~20x better performance using (process "gzip") to fork
gzip and compress that way, compared with a string-compression
procedure that I copied from the z3 test-script:


I know it's not an apples-to-apples comparison. But why the huge
difference? My lack of understanding of the z3 egg may be the cause.

Your code looks ok. Note the massive number of (major) garbage
collections. The code just conses a lot. One reason for that is the
repeated (and required) use of substring. The z3lib itself should be
fast enough, but it may be that the interface is too simplistic. I
will add a set of compress/decompress-the-whole-buffer routines written
in C which should be much faster.


reply via email to

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