twofish eats a LOT of memory

Matthew Skala mskala at
Tue Aug 11 17:43:38 CEST 1998

On Tue, 11 Aug 1998, Thomas Mikkelsen wrote:
> I have 32 MB ram and 32 MB swap, I run Linux 2.1.115 and egcs 1.0.2. The
> problem was solved by using -O instead of -O2.

This is interesting, because it compiled without running out of virtual
memory on my 486 running Linux 2.0.30, with only 16M of RAM and 32M of
swap.  However, it took about a half hour to compile.  The resulting code
ran with no detectable speed increase over the code with optimization
turned off; as a result, I don't recommend turning optimization on for
that file.  The code is heavily hand-optimized - if you look at the
source, you'll find I've unrolled all the loops and so on. I think the
optimizer probably chokes trying to further optimize it. 

I don't know if it's easy to do in the context of the automatic
configuration system, but maybe the makefile should turn optimization off
for this one file.  (Alternatively, I or someone else could re-write the
file to "un-optimize" it, but that seems like a bad idea...)

"Let me lose so beautifully     
 Let me lick the dew from the money tree           Matthew Skala
 Have the moms of the world all care about me        Ansuz BBS
 At suppertime"                        - Odds     (250) 472-3169

More information about the Gnupg-devel mailing list