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

2005-06-12 Thread Martin Schreiber
Some more experience: 7a: like 7 but ansi string 9a: like 9, without loop instruction 10: like 6, loop in assembler 10a like 10, without loop instruction (PII, 350MHz) Kilix: lowercase execution time: 335536 lowercase 1 execution time: 369539 lowercase 2 execution time: 377384 lowercase 3

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

2005-06-12 Thread Daniël Mantione
Op Sat, 11 Jun 2005, schreef L505: 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

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

2005-06-12 Thread Florian Klaempfl
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

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

2005-06-12 Thread L505
I use fastcode stuff some times, I just never spend too much time figuring out how all the code works. The way I do it is I create my software application first in Pascal.. Then if I find a huge bottleneck, I pull in a optimized function in place of the old one.. even if I dont' understand the

Re: [fpc-devel] out parameters in RTL/FCL

2005-06-12 Thread Hans-Peter Diettrich
Peter J. Haas wrote: I write in German language because I'm not able to translate my statement comprehensibly. Maybe anybody can translate it for people, which don't can read German. Sorry for OT, please ignore the following if you don't understand German(s) ;-) ... Ich hatte bei den Mails

Re: [fpc-devel] Extend the libraries people!

2005-06-12 Thread Hans-Peter Diettrich
L505 wrote: ... But compiled with delphi compiler, or freepascal? I wonder if they have a specific restriction where you can only compile the code on their compilers... Not that I know of but.. I thought maybe you guys had come across something like that The System.pas unit is special. In

Re: [fpc-devel] out parameters in RTL/FCL

2005-06-12 Thread Jonas Maebe
On 10 Jun 2005, at 14:20, Hans-Peter Diettrich wrote: Sorry for OT, please ignore the following if you don't understand German(s) ;-) Please send such mails off-list. Thanks. Jonas FPC mailing lists moderator ___ fpc-devel maillist -

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

2005-06-12 Thread David Butler
On Sat, 11 Jun 2005 18:36:44 +0200 (CEST), you wrote: The most expensive operation in the whole LowerCase function is the UniqueString allocation for when the string changes. For the case where the string is already in lower case it is important not call UniqueString. It makes a 600%

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

2005-06-12 Thread Uberto Barbini
That is why I use pchar and one uniquestring; It prevents all these automated uniquestring calls. Why call it when it might not be necessary?? My point is that you can make the function MUCH faster for the case where the function doesn't modify the string by not calling UniqueString at

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

2005-06-12 Thread Daniël Mantione
Op Sun, 12 Jun 2005, schreef Uberto Barbini: That is why I use pchar and one uniquestring; It prevents all these automated uniquestring calls. Why call it when it might not be necessary?? My point is that you can make the function MUCH faster for the case where the function

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

2005-06-12 Thread Tomas Hajny
From: Martin Schreiber [EMAIL PROTECTED] To: FPC developers' list fpc- [EMAIL PROTECTED] 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

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

2005-06-12 Thread Daniël Mantione
Op Sun, 12 Jun 2005, schreef Uberto Barbini: If I understood well, with modern processor an unpredicatable branch (i.e. one with similar probability) is much more time-consuming that an unnecessary function call. Yes, but the call needs to do memory allocation and a string copy, so

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

2005-06-12 Thread Jonas Maebe
On 12 Jun 2005, at 13:20, Daniël Mantione wrote: Borland's compiler does register variables better than FPC and can do induction variables. This has a large impact on the code generation in general. I thought I saw that FPC beat Kylix in several cases in the timings that were posted.

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

2005-06-12 Thread Yury Sidorov
Oh, I found the bug. There should be: Inc(byte(P^), 32); instead of previously posted: Inc(byte(P^)); Here is correct implementation: Function Lowercase41(Const S : String) : String; var i: Integer; P: PChar; Changed: boolean; begin Changed:=False; P := PChar(S); for i

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

2005-06-12 Thread L505
Borland's compiler does register variables better than FPC and can do induction variables. This has a large impact on the code generation in general. |I thought I saw that FPC beat Kylix in several cases in the timings |that were posted. I saw this too, so what do you mean Daniël .. in the

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

2005-06-12 Thread Daniël Mantione
Op Sun, 12 Jun 2005, schreef L505: Borland's compiler does register variables better than FPC and can do induction variables. This has a large impact on the code generation in general. |I thought I saw that FPC beat Kylix in several cases in the timings |that were posted. I saw this

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

2005-06-12 Thread Yury Sidorov
Hello, I was looking at this discussion and decided to put my 5 cents :) I made 2 fastest modifications based on Lowercase4. Lowercase41 is optimized for input which is already lowercased. Lowercase42 slower if input is already lowercased and a bit faster for mixed case input. The best

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

2005-06-12 Thread Kornel Kisielewicz
Jonas Maebe wrote: Once. Since it is the start value, that is even quite logical. However, even if it appeared in the end condition it would also be only calculated once at the start of the loop. This is even required for correctness, because it's possible to do something like i := 5 for

FMTBcd implementation for FPC was Re: [fpc-devel] Extend the libraries people!

2005-06-12 Thread Jan Ruzicka
Hi are you interested in FMTBcd unit for FPC ? I would appreciate information needed for clean implementation. Page used for collecting information is: http://www.freepascal.org/wiki/index.php/BcdUnit At this moment most valuable are test cases for different functions. Also more explanation

[fpc-devel] Bug: fpc-svn-392 compile error

2005-06-12 Thread Jan Ruzicka
Hi latest version form SVN does not even compile. Is there any plan to have something similar to a mozilla tinderbox? Jan error: /usr/local/bin/ppcppc -dNOMOUSE -Ur -dFPC_USE_LIBC -Xs -O1 -n -Fi../inc -Fi../powerpc -Fi../unix -Fi../bsd -Fi../bsd/powerpc -Fi../darwin/powerpc -FE.