For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > March 2004 > nawk program optimizing









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author nawk program optimizing
Casey

2004-03-27, 12:16 am

I have written a nawk program that processes 100s to 1000s of files. It now
runs at a decent pace, but as a true "hacker" at heart, I want to make it
run faster. Question is, there is always more then one way to do anything,
however option is not always the fastest. Dose anyone have, or know a
resource, that lists all of the nawk commands, and how many clock counts
each takes to run?


Marc Rochkind

2004-03-27, 12:16 am


"Casey" <cdill7174@yahoo.com> wrote in message
news:24-dnW5MLuFjecbdRVn-uA@comcast.com...
> I have written a nawk program that processes 100s to 1000s of files. It

now
> runs at a decent pace, but as a true "hacker" at heart, I want to make it
> run faster. Question is, there is always more then one way to do

anything,
> however option is not always the fastest. Dose anyone have, or know a
> resource, that lists all of the nawk commands, and how many clock counts
> each takes to run?
>
>

I'm not saying that such a thing doesn't exist, because maybe it does, but
Awk has fallen out of favor over the last 10 - 15 years as more
general-purpose scripting languages like Perl and Python have become
popular. So, you're not likely to find much information about Awk. (I'm not
sure that what you're looking for is available even for Perl or Python.)

Regardless of language, what you want is not some counts you can add up, but
rather a profiling tool that tells you where you're spending the time when
you're running your program against your data. Do a google search for
"profiling" and your favorite language and see what you get.

--
Marc Rochkind
"Advanced UNIX Programming" (publishing April 2004)
www.basepath.com/aup


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com