>Subject: Str[N]Compare performance in 4.0
>From: Ken Krugler <[EMAIL PROTECTED]>
>Date: Fri, 08 Jun 2001 15:51:26 -0700
>
>>  > From: Kevin
>>  >
>>  > I have a commerical application that has run fine under
>>  > all 3.x version of PalmOS. Under 4.0 it runs very slowly.
>>  > I have not been able to pinpoint any particular API calls
>>  > that run slower.  It appears as if the C code just runs
>>  > slower especially string manipulation and searching.
>>  > Anyone had a similar experience?
>>  >
>>
>>I think you'll find that StrCompare() and StrNCompare() are slower in the
>>4.0 SDK.
>
>StrCompare should be roughly comparable in speed, less the trap 
>dispatch overhead of calling through to TxtCompare.
>
>StrNCompare will be slower in 4.0 - the longer the strings you're 
>passing in, the bigger the performance issue.

Somebody (perhaps the "pedit guy") did actual timing comparisons
and found Str[N]Compare was substantially slower on 4.0 than
on previous releases.  The reason was the call to TxtCompare, which
uses multi-byte-based comparisons.   There's also the overhead of 
the trap in StrCompare.

So it is likely that the Str[N]Compare function is the culprit here.

If you don't need the muti-byte string support, then you can use
the Str[N]CompareAscii functions.  

Roger Stringer
Marietta Systems, Inc.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to