[fpc-devel] Patch to speed up Uppercase/Lowercase functions

Luiz Américo pascalive at bol.com.br
Fri Jun 10 23:05:14 CEST 2005


Michael Van Canneyt wrote:
> 
> On Fri, 10 Jun 2005, Joost van der Sluis wrote:
> 
> 
>>Hi all,
>>
>>I don't know if rtl-optimilisation patches have a large priority, but
>>nevertheless this patch improves the speed of the sysutils.uppercase and
>>lowercase functions.
> 
> 
> I fail to see how changing a while loop to a for loop improves speed ?
> I could understand if you'd use a PChar and use pointer math, but not this ?
> 
> 

BTW, in the snippet below, Length(S) is called once or at each iteration?

for i := Length(S) downto 1 do

Luiz




More information about the fpc-devel mailing list