tweaking efficiency
Brian K. White
brian at aljex.com
Wed Sep 28 13:38:42 PDT 2005
Is there any difference in the amount of work done behind the scenes between
these two?
... < xlate(@t4,"/","") < xlate(@tm,":","")
... < xlate(@t4<@tm,"/:","")
They don't produce the exact same output, the 2nd one leaves more than one
space between the two values but that's fine because they are building a
string of cmmand line arguments and the extra spaces don't hurt so for me
they are functionaly equivalent.
The 1st version is more quicly read and understood, but I'm always trying to
make things as efficient as possible so the 2nd version occured to me.
It's one less comand, but it's doing the same work so unless there is some
overhead just calling and returning from a command at all, I'm guessing
there is no advantage to the 2nd way?
It's obviously more an academic question than anything. If this was in a
tight loop that ran hundreds of times per second for a hundred different
users at the same time, it might have a real world consequence, but that's
not the case.
Actually originally I had this but I'm just assuming that xlate is lighter
weight than doedit
... < doedit(@t4,"yymd") < xlate(@tm,":","")
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
More information about the Filepro-list
mailing list