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

Tomas Hajny XHajT03 at mbox.vol.cz
Sun Jun 12 12:43:19 CEST 2005


From:           	Martin Schreiber <fpmse at bluewin.ch>
To:             	FPC developers' list <fpc-
devel at lists.freepascal.org>
Subject:        	Re: [fpc-devel] Patch to speed up 
Uppercase/Lowercase functions
Date sent:      	Sun, 12 Jun 2005 00:12:44 +0200

> Some more test results with PII 350MHz and
> two additional implementations with lookup table:
> 
> Kylix:
> lowercase   execution time: 336887
> lowercase 1 execution time: 380923
> lowercase 2 execution time: 375411
> lowercase 3 execution time: 369814
> lowercase 4 execution time: 320665
> lowercase 5 execution time: 300580
> lowercase 6 execution time: 219047
> lowercase 7 execution time: 356606
> lowercase 8 execution time: 249913
> lowercase 9 execution time: 252431
> 
> FPC -OG1
> lowercase   execution time: 474871
> lowercase 1 execution time: 497440
> lowercase 2 execution time: 464547
> lowercase 3 execution time: 488088
> lowercase 4 execution time: 322630
> lowercase 5 execution time: 321486
> lowercase 6 execution time: 299599
> lowercase 7 execution time: 279863
> lowercase 8 execution time: 282185
> lowercase 9 execution time: 181006


What's the intended purpose of jz in the following fragment from 
lowercase9:

   mov ecx,[ebx-4] //length
   jz @l1

As far as I know, mov instruction doesn't set zero flag. Zero length 
is checked earlier in the code, though, so it doesn't matter for that 
- just the jz instruction seems to be useless there.

Tomas




More information about the fpc-devel mailing list