On Mon, 18 Sep 2006 09:41:35 +0200 "A.J. Venter" <[EMAIL PROTECTED]> wrote:
> I ran wole through gprof recently to see if I can speed it up a > bit... imagine my surprize to learn that 47% of wole's total CPU time > is spent - not on drawing, not on calculating, not on launching > children - not even the very complex recursive function used to > compare version numbers but purely on uppercase(ansistring). gprof has a unit of 10ms. Maybe your program runs in total less than 1 second and the rest are external libs? Then the gprof numbers are useless. > Now indeed I do use a few (about 5) such calls, mostly for the > purpose of doing case independent string checks such as > if pos('<ITEM>',uppercase(RSS)) = 0 then > > Now some things to considder: > RSS here is the single ansistring format of an entire RSS source - so > yes, it's quite big, probably several kilobytes (but not megabytes), > so that could be part of why uppercase takes so much time - also > there are at least 3 such sources in a typical run - so this > particular one runs three times. > > Nonetheless - should uppercase take up THAT much CPU time ? > > The RSS parser code I use makes quite a lot of use of the abilities > that come from reading tstringlist as a single string, could be VERY > hard to rewrite, but even so the rest of it doesn't seem to be using > much CPU at all anyway. > > Should I rewrite this test ? If so... how would you suggest I do it ? Make the test longer. Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives