[fpc-devel] Patch to speed up Uppercase/Lowercase functions
Florian Klaempfl
F.Klaempfl at gmx.de
Sun Jun 12 09:15:25 CEST 2005
L505 wrote:
> http://dennishomepage.gugs-cats.dk/LowerCaseChallenge.htm
>
> LowerCaseShaPas2_c
> This one here is in Pascal, using GOTO and LABEL which consistently work fast on
> both -Og and -OG
> But no one wants to maintain a GOTO and a LABEL..
>
> [LowerCaseShaPas2_c] was slightly slower than [lowercase 6 ] (second fastest)
> in -OG mode
> [LowerCaseShaPas2_c] was slightly faster than [lowercase 9] (still second
> fastest) in -Og mode .. so it's more consistent across compiler options it
> seemed
>
> So maybe [lowercase 6 ] result should be submitted to fastcode to be tested?
>
> Also, if no one wants to use the assembly functions
Asm is ok as well as long as there is also a good pascal implementation.
> and GOTO/LABEL functions in
I've no problem with goto/label as long as it affects only a litte part
of the rtl.
> the RTL due to code bloat/maintenance, we could always offer an optional unit
> where people could call the fast functions only if they needed them badly.
> Just like how fastcode does, external from the VCL.
>
> ----- Original Message -----
> From: "Martin Schreiber" <fpmse at bluewin.ch>
> To: "FPC developers' list" <fpc-devel at lists.freepascal.org>
> Sent: Saturday, June 11, 2005 9:29 PM
> Subject: Re: [fpc-devel] Patch to speed up Uppercase/Lowercase functions
>
>
> On Sunday 12 June 2005 00.23, Jonas Maebe wrote:
>
>>Try also with register variables on (-O???r), it will probably more
>>closely match Kylix' results then in case of the loop versions.
>
>
> 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
>
> -OG1r
> lowercase execution time: 465596
> lowercase 1 execution time: 378780
> lowercase 2 execution time: 389711
> lowercase 3 execution time: 375878
> lowercase 4 execution time: 225029
> lowercase 5 execution time: 228708
> lowercase 6 execution time: 158026
> lowercase 7 execution time: 264930
> lowercase 8 execution time: 182939
> lowercase 9 execution time: 165446
>
> -OG2r
> lowercase execution time: 471705
> lowercase 1 execution time: 378160
> lowercase 2 execution time: 388112
> lowercase 3 execution time: 395773
> lowercase 4 execution time: 227191
> lowercase 5 execution time: 227925
> lowercase 6 execution time: 156750
> lowercase 7 execution time: 258313
> lowercase 8 execution time: 181842
> lowercase 9 execution time: 165069
>
> -Og1r
> lowercase execution time: 464843
> lowercase 1 execution time: 486571
> lowercase 2 execution time: 463269
> lowercase 3 execution time: 472342
> lowercase 4 execution time: 247544
> lowercase 5 execution time: 399030
> lowercase 6 execution time: 646651
> lowercase 7 execution time: 263588
> lowercase 8 execution time: 636059
> lowercase 9 execution time: 170660
>
> -Og2r
> lowercase execution time: 470038
> lowercase 1 execution time: 487086
> lowercase 2 execution time: 459035
> lowercase 3 execution time: 476304
> lowercase 4 execution time: 243678
> lowercase 5 execution time: 399953
> lowercase 6 execution time: 646284
> lowercase 7 execution time: 265147
> lowercase 8 execution time: 632796
> lowercase 9 execution time: 169471
>
> Martin
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list