Re: A little speed up for awk

看板DFBSD_submit作者時間21年前 (2004/10/31 06:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/7 (看更多)
dillon wrote @ Sat, 30 Oct 2004 14:39:15 -0700 (PDT): Btw. the original To: was the maintainer, i don't appreciate bestserv messing with my To: / CC: lines. I woudn't have been so formal only talking to you guys :-P > Well, that's a fine little patch but I really doubt it will > make much of a dent in awk's performance. The problem case that came up on irc: jot -w DragonFly 5000 | /usr/bin/time awk '{x=x $0}' was improved by around 25% but since gawk e.g. is around 10 times faster it doesn't really matter. Joerg indicates one true awk being faster in other situations so this might just be a corner case. I'm not really into awk and so i won't come up with with better real world cases. > If you really want to have a go at tracking down potential > performance issues I recommend first doing some side-by-side > comparisons between the old and new awk and then compiling > up the new awk with profiling (-pg) and seeing if there is > anything obvious in the profile output that could be fixed. > The issue is likely to be algorithmic in nature. Ya, probably, like keeping the length of the string around in the Cell. strcpy was the ruler of profiling, that's how i found it. It was just a cheap shot. Andy
文章代碼(AID): #11X0yu00 (DFBSD_submit)
文章代碼(AID): #11X0yu00 (DFBSD_submit)