[lkml]   [1996]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Faster depend written in Perl
Ian Burrell <> writes:

> I have an old 386/33 and running 'make depend' takes a long time.

Upgrade! 486 motherboards with CPU are so cheap that there is no

> I heard this was because gawk uses floating point instead of integer
> arithmetic. To speed things up, I translated the depend.awk script
> into Perl using the a2p program. I edited the result to clean up
> the code. The resulting script runs much faster (up to an order of
> magnitude on my machine without a coprocessor) either because of
> integer arithmetic or Perl's faster I/O.

It runs 25% faster on my P-90 (it's mostly I/O bound), but I'm not
complaining. It might be possible to tweak the translation a bit

You might try also mawk instead of gawk. gawk is slow. Running the
script with mawk was 36% faster than gawk.

Defaulting to the perl version is probably better since most people
don't have mawk.


Daniel Quinlan Member of the League for Programming Freedom

 \ /
  Last update: 2005-03-22 13:37    [W:0.176 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site