bug-gnulib
[Top][All Lists]
Advanced

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

Re: FYI, new sha256 and sha512 modules in coreutils


From: Jim Meyering
Subject: Re: FYI, new sha256 and sha512 modules in coreutils
Date: Mon, 03 Mar 2008 14:41:54 +0100

Bruno Haible <address@hidden> wrote:
> Jim Meyering asked:
>> > The compilation of these files with -g -O2 and newer gcc releases takes
>> > an awful lot of time (5 minutes or so). Is there some way to make gcc work
>> > faster, without decreasing the runtime speed too much?
>>
>> Wow.  What version of gcc, and what type of CPU?
>
> CPU: AMD-K7 500 MHz
>
> gcc             time make      time make
> version         sha256.o       sha512.o
>
> 3.2.2            6.1 sec       68 sec
> 4.0.4            5.5 sec       27 sec
> 4.1.2            5.1 sec       14.4 sec
> 4.2.2            5.2 sec       12.5 sec
> 4.3-20080215    10.8 sec       20.1 sec
>
> So indeed the problem is indeed not as severe as I remembered, but 20 seconds
> of compilation time for a not particularly large file with the newest gcc is
> still not nice.
>
> Is there a good workaround?

If by workaround you mean a change to sha256.c or sha512.c, then I
haven't even looked.  It's not worth trying to find such a workaround,
when much faster CPUs are available at so little cost.
With a $110/110-euro CPU (AMD X2 5200), I get a time of .25s for sha512.o.

However if you present your measurements to the gcc developers,
they may even address the root cause.  Then again, (I don't know) they
may say that -O2 now does more, and as such the increase is justified.




reply via email to

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