Re: [fpc-pascal] When Pascal code is too fast

2007-10-31 Thread Peter Vreman
> On 11/1/07, Marc Santhoff <[EMAIL PROTECTED]> wrote: >> Am Donnerstag, den 01.11.2007, 00:45 +0200 schrieb ik: >> > Hi List, >> > >> > I have a weird problem. the "fpWrite" is too "slow" for FPC code. When >> > I have the same exact code in C that writes a big amount of buffers of >> > the same s

Re: [fpc-pascal] When Pascal code is too fast

2007-10-31 Thread ik
On 11/1/07, Marc Santhoff <[EMAIL PROTECTED]> wrote: > Am Donnerstag, den 01.11.2007, 00:45 +0200 schrieb ik: > > Hi List, > > > > I have a weird problem. the "fpWrite" is too "slow" for FPC code. When > > I have the same exact code in C that writes a big amount of buffers of > > the same size with

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Graeme Geldenhuys
On 01/11/2007, Vincent Snijders <[EMAIL PROTECTED]> wrote: > > No more strlen: > http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgid=1432 Wow, that version improved quite a bit from the previous one!! [EMAIL PROTECTED]:word_parser$ time ./project1_fast Word count:126944 Unique word count:11

Re: [fpc-pascal] When Pascal code is too fast

2007-10-31 Thread Marc Santhoff
Am Donnerstag, den 01.11.2007, 00:45 +0200 schrieb ik: > Hi List, > > I have a weird problem. the "fpWrite" is too "slow" for FPC code. When > I have the same exact code in C that writes a big amount of buffers of > the same size with the same content. It seems that the fpWrite is way > too fast,

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Daniël Mantione
Op Wed, 31 Oct 2007, schreef Vincent Snijders: > Florian Klaempfl schreef: > > Vincent Snijders schrieb: > > > > Why not SetLength(s,i)? StrLen is _very_ expensive. I don't see a way > > how another #0 can be before. > > No more strlen: > http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgi

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Florian Klaempfl schreef: Vincent Snijders schrieb: Why not SetLength(s,i)? StrLen is _very_ expensive. I don't see a way how another #0 can be before. No more strlen: http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgid=1432 Vincent ___ fpc-pas

[fpc-pascal] When Pascal code is too fast

2007-10-31 Thread ik
Hi List, I have a weird problem. the "fpWrite" is too "slow" for FPC code. When I have the same exact code in C that writes a big amount of buffers of the same size with the same content. It seems that the fpWrite is way too fast, and the can't handle another call in the loop, and I need to slow d

Re: [fpc-pascal] fast text processing

2007-10-31 Thread L
> > > Word count: 126944 > > > Unique word count: 11793 > > > > > > real0m0.281s > > > user0m0.244s > > > sys 0m0.016s > > > > Can someone do a test for 5 minutes of parsing Rather I mean can someone do a more realistic test such as parsing 1500 files instead of one single file. At lea

Re: [fpc-pascal] fast text processing

2007-10-31 Thread L
> > Word count: 126944 > > Unique word count: 11793 > > > > real0m0.281s > > user0m0.244s > > sys 0m0.016s > Can someone do a test for 5 minutes of parsing and see if things slow down or speed up for one of the programs? That takes away process load time too.. example: the time it ta

Re: [fpc-pascal] fast text processing

2007-10-31 Thread L
> > Well, considering that perl's or Python's speed greatly rely on the > > underlying C-implementation of (at least) particular functionality, all > > those comparisons basically boil down to C vs. C, anyway. Or don't > > they? > > Exactly! That's why I prefer to use fpc own regexpr unit. :) >

Re: [fpc-pascal] Speed

2007-10-31 Thread Jilani Khaldi
For example, what do Airplanes use? GNU? Ada compilers must be certified, so if you are developing software for avionics *you have* to write your software with a compiler certified for avionics development. JK ___ fpc-pascal maillist - fpc-pascal@l

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Mattias Gaertner
On Wed, 31 Oct 2007 13:56:04 +0100 (CET) [EMAIL PROTECTED] (Marco van de Voort) wrote: > [ Charset ISO-8859-1 unsupported, converting... ] > > > I had never used Perl before. Until someone showed me Perl is > > > very fast for text processing (using its powerful regex), despite > > > it's an inter

Re: [fpc-pascal] Speed

2007-10-31 Thread Jonas Maebe
On 31 Oct 2007, at 19:11, L wrote: Further, it is unknown how well the GCC backend optimizes Ada language constructs as it is primarily designed for the C language. I assumed that people used not just GNU Ada compilers.. for serious work. But I'm not sure. For example, what do Airplanes u

Re: [fpc-pascal] Speed

2007-10-31 Thread L
> Further, it is unknown how well the GCC backend optimizes Ada > language constructs as it is primarily designed for the C language. I assumed that people used not just GNU Ada compilers.. for serious work. But I'm not sure. For example, what do Airplanes use? GNU? I'd laugh if Richard Stallman

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Florian Klaempfl schreef: Vincent Snijders schrieb: Jeff Pohlmeyer schreef: s[i]:=#0; SetLength(s,StrLen(@s[1])); Why not SetLength(s,i)? StrLen is _very_ expensive. I don't see a way how another #0 can be before. That is right, I am working on a version which does not do

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Florian Klaempfl
Vincent Snijders schrieb: > Jeff Pohlmeyer schreef: this kludge is about 25% faster than your perl script on my machine >> >>> Nope. It's still more or less twice slower. :-D >> >> >> I guess it depends on the hardware: >> >> % time koleksi.pl # perl >> Word count: 126944 >> Unique

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
Well, considering that perl's or Python's speed greatly rely on the underlying C-implementation of (at least) particular functionality, all those comparisons basically boil down to C vs. C, anyway. Or don't they? Exactly! That's why I prefer to use fpc own regexpr unit. :) -Bee- has Bee.ogra

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
A. That is not a problem. A couple of other, non-c participants use pcre. I myself would consider them lacks of the language advantage on their own. B. The same is done with pidigits. C. It shows that fpc has good interoperability. We could submit more than one programs, one using fpc own re

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vinzent Hoefler
On Wednesday 31 October 2007 14:19, Bee wrote: > > Sure, but as Jonas pointed out it is better to use a good library > > than the write a bad library yourself. > > And someone would claim that the speed comes from the library (c?), > not > > >from pascal. :P It's a LANGUAGE shootout btw, not LIBRAR

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Bee schreef: Sure, but as Jonas pointed out it is better to use a good library than the write a bad library yourself. And someone would claim that the speed comes from the library (c?), not from pascal. :P It's a LANGUAGE shootout btw, not LIBRARY shootout. Maybe you had forgotten that. ;)

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
Sure, but as Jonas pointed out it is better to use a good library than the write a bad library yourself. And someone would claim that the speed comes from the library (c?), not from pascal. :P It's a LANGUAGE shootout btw, not LIBRARY shootout. Maybe you had forgotten that. ;) -Bee- has Be

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Henry Vermaak
On 31/10/2007, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > > That was fun!!! :-0 So what's the task for tomorrow? ;-) for tomorrow the homework is: improve fpc regexp capability and get fpc in the top 5 on the regex-dna shootout ratings ;) > > > Regards, > - Graeme - henry ___

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Bee schreef: But people who have seen http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=all may have doubted that. Vincent, are we connected or what?! I was about to post the very exact URL! :-D I wonder where fpc would end up in that list, A: if it uses its own rege

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
But people who have seen http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=all may have doubted that. Vincent, are we connected or what?! I was about to post the very exact URL! :-D I wonder where fpc would end up in that list, A: if it uses its own regexpr parser (atm n

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Marco van de Voort schreef: [ Charset ISO-8859-1 unsupported, converting... ] I had never used Perl before. Until someone showed me Perl is very fast for text processing (using its powerful regex), despite it's an interpreted language. It even beat Delphi and FPC though both are compiled langu

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Marco van de Voort
[ Charset ISO-8859-1 unsupported, converting... ] > > I had never used Perl before. Until someone showed me Perl is very fast > > for text processing (using its powerful regex), despite it's an > > interpreted language. It even beat Delphi and FPC though both are > > compiled language. A few lin

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Graeme Geldenhuys
On 31/10/2007, Bee <[EMAIL PROTECTED]> wrote: > > Alright everyone. The answers are enough. Now I can say confidently that > pascal (fpc v.2.2) is FASTER than Perl, including in text processing. ;) > > Thank you very much to everyone who involves in this thread. :) That was fun!!! :-0 So what's

Re: [fpc-pascal] Speed

2007-10-31 Thread Vinzent Hoefler
On Wednesday 31 October 2007 12:35, Daniël Mantione wrote: > Further, it is unknown how well the GCC backend optimizes Ada > language constructs as it is primarily designed for the C language. Well enough. In other words, optimization is about the same - given fairly equivalent code. The main d

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-31 Thread Germán Pablo Gentile - PetroBox
El mar, 30-10-2007 a las 19:36 +0200, Musan Antal escribió: > > Oh, my GOD! > I hope, in the current eternity, no change in the value of pi might > occur! I bet the circles will never will be the same if that happens.:P > ___ > fpc-pascal maillist -

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
I had never used Perl before. Until someone showed me Perl is very fast for text processing (using its powerful regex), despite it's an interpreted language. It even beat Delphi and FPC though both are compiled language. A few lines Perl program almost two times faster than a few pages pascal p

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Adrian Maier
On 10/31/07, Marco van de Voort <[EMAIL PROTECTED]> wrote: > > On 10/31/07, Joao Morais <[EMAIL PROTECTED]> wrote: > > > They are reference counted, just like ansi strings, ie don't worry about > > > memory leakages. > > > > The detail that is not crystal clear to me is : after the first SetLengt

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Graeme Geldenhuys
On 31/10/2007, Marco van de Voort <[EMAIL PROTECTED]> wrote: > > It could be wise to add -O3 for anything considered a benchmark :-) It squeezed another 0.015s out of the time making it even faster. :-) Regards, - Graeme - ___ fpGUI - a cross-plat

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Marco van de Voort
> On 10/31/07, Joao Morais <[EMAIL PROTECTED]> wrote: > > They are reference counted, just like ansi strings, ie don't worry about > > memory leakages. > > The detail that is not crystal clear to me is : after the first SetLength > and i set the first 3 elements , is it *guaranteed* that th

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Marco van de Voort
> On 31/10/2007, Vincent Snijders <[EMAIL PROTECTED]> wrote: > > > > Maybe I have a relatively slow computer, so I get more speedup. Keep in > > mind, that > > disk time is constant. > > > > I'm also not sure if FPC compiler parameters where used. I did. > I compiled as:fpc project1.pas It c

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Graeme Geldenhuys
On 31/10/2007, Vincent Snijders <[EMAIL PROTECTED]> wrote: > > Maybe I have a relatively slow computer, so I get more speedup. Keep in mind, > that > disk time is constant. > I'm also not sure if FPC compiler parameters where used. I did. I compiled as:fpc project1.pas Anyway, here is the H

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Bee schreef: [EMAIL PROTECTED]:word_parser$ time ./project1 Word count:126944 Unique word count:11793 real0m0.185s user0m0.140s sys 0m0.000s [EMAIL PROTECTED]:word_parser$ time perl project1.perl Word count: 126944 Unique word count: 11793 real0m0.281s user0m0.244s sys

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Bee schreef: [EMAIL PROTECTED]:word_parser$ time ./project1 Word count:126944 Unique word count:11793 real0m0.185s user0m0.140s sys 0m0.000s [EMAIL PROTECTED]:word_parser$ time perl project1.perl Word count: 126944 Unique word count: 11793 real0m0.281s user0m0.244s sys

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Graeme Geldenhuys
On 31/10/2007, Bee <[EMAIL PROTECTED]> wrote: > > Vincent said it was 3 times faster. I expected the result would be about > 0.10s. Or am I wrong? Maybe that's machine dependent I'll try the one without the hash table to see the difference. Otherwise, lets just compare the sys time and say it

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
[EMAIL PROTECTED]:word_parser$ time ./project1 Word count:126944 Unique word count:11793 real0m0.185s user0m0.140s sys 0m0.000s [EMAIL PROTECTED]:word_parser$ time perl project1.perl Word count: 126944 Unique word count: 11793 real0m0.281s user0m0.244s sys 0m0.016s Vin

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Joao Morais
Lourival Mendes wrote: SetLength(Vetor, 2) Vetor[0]:= 1 Vetor[1]:= 2 As you can see you don't lose the first 2, After that you want 4 elements on the same variable: SetLength(Vetor, 4) If you print the variable, before associate any value to it you will get: Vetor[0]:= 1

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Graeme Geldenhuys
Well done Vincent!! :-) I can confirm your results... [EMAIL PROTECTED]:word_parser$ time ./project1 Word count:126944 Unique word count:11793 real0m0.185s user0m0.140s sys 0m0.000s [EMAIL PROTECTED]:word_parser$ time perl project1.perl Word count: 126944 Unique word count: 11793

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Lourival Mendes
Dear Joao, I do beleive that the SetLength only resize the array, ie: The Vetor has 3 elements like: Vetor[0]:= 1 Vetor[1]:= 2 Vetor[2]:= 3 And then eu want the same variable but with only 2 element, then SetLength(Vetor, 2) Vetor[0]:= 1 Vetor[1]:= 2 As you can see you

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Joao Morais
Adrian Maier wrote: On 10/31/07, Joao Morais <[EMAIL PROTECTED]> wrote: Adrian Maier wrote: On 10/31/07, Matt Emson <[EMAIL PROTECTED]> wrote: Adrian Maier wrote: Hello, I'm seeking for advice about which is the best way to hold an array of class instances I need to access the elements using

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Joao Morais
Marco van de Voort wrote: Adrian Maier wrote: VArray: array of TSomeClass; begin SetLength(VArray, 10); // now you have VArray[0] .. VArray[9]; SetLength(VArray, 20); // now you have [0] .. [19]; // Length(VArray) = 20 // for I := 0 to Pred(Length(VArray)) is a valid statemen

Re: [fpc-pascal] Speed

2007-10-31 Thread Daniël Mantione
Op Wed, 31 Oct 2007, schreef Jilani Khaldi: > > > I hear the Intel C compilers and Fortran compilers and Ada compilers > > > are better > > > optimized for certain things since FPC/delphi are generally desinged > > > for GUI > > > programming. ;-) > > > > C/Fortran yes, Ada no; there exists no

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Matt Emson
Marco van de Voort wrote: Adrian Maier wrote: VArray: array of TSomeClass; begin SetLength(VArray, 10); // now you have VArray[0] .. VArray[9]; SetLength(VArray, 20); // now you have [0] .. [19]; // Length(VArray) = 20 // for I := 0 to Pred(Length(VArray)) is a valid statemen

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Adrian Maier
On 10/31/07, Joao Morais <[EMAIL PROTECTED]> wrote: > Adrian Maier wrote: > > On 10/31/07, Matt Emson <[EMAIL PROTECTED]> wrote: > >> Adrian Maier wrote: > >>> Hello, > >>> > >>> I'm seeking for advice about which is the best way to hold an array of > >>> class instances > >>> I need to access the

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Marco van de Voort
> Adrian Maier wrote: >VArray: array of TSomeClass; > begin >SetLength(VArray, 10); >// now you have VArray[0] .. VArray[9]; >SetLength(VArray, 20); >// now you have [0] .. [19]; >// Length(VArray) = 20 >// for I := 0 to Pred(Length(VArray)) is a valid statement > > The

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Joao Morais
Adrian Maier wrote: On 10/31/07, Matt Emson <[EMAIL PROTECTED]> wrote: Adrian Maier wrote: Hello, I'm seeking for advice about which is the best way to hold an array of class instances I need to access the elements using its position (like a regular array) , and also i'd like the structure to

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
I made it three times as fast on my computer (windows 2000, fpc 2.3.1, P4 1.5 Ghz) using a hashlist for the unique word count. Using a larger textbuf gave an additional 10% speed up: Arrrggg, I hate myself for not able to upgrade to fpc v.2.2.0! I can't find TFPStringHashTable on fpc v.2.0

[fpc-pascal] fast text processing

2007-10-31 Thread Jeff Pohlmeyer
> the easiest is simply making a FPC header to > pcre, it might be useful even. I did that, once upon a time... http://www.hotlinkfiles.com/files/526004_qpvr0/pcre-fpc.tar.gz -Jeff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Marco van de Voort
> > If you just want to show off, the easiest is simply making a FPC header to > > pcre, it might be useful even. > > Someone had worked on it using Delphi7 and PCRE. A little optimization > is done on the TStringList, it uses CompareText instead of CompareStr > for text comparison. It does fast

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
AMD-K6-700 / SuSE-10.3 / Linux-2.6.22 / perl-5.8.8 / fpc-2.2.0 Probably because the different fpc version, no? I'm using fpc 2.0.4. However, this is a good news. :) -Bee- has Bee.ography at: http://beeography.wordpress.com ___ fpc-pascal maillist

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Jeff Pohlmeyer schreef: this kludge is about 25% faster than your perl script on my machine Nope. It's still more or less twice slower. :-D I guess it depends on the hardware: % time koleksi.pl # perl Word count: 126944 Unique word count: 11793 real0m1.019s user0m0.992s sys

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
If you just want to show off, the easiest is simply making a FPC header to pcre, it might be useful even. Someone had worked on it using Delphi7 and PCRE. A little optimization is done on the TStringList, it uses CompareText instead of CompareStr for text comparison. It does faster than my pro

[fpc-pascal] fast text processing

2007-10-31 Thread Jeff Pohlmeyer
> > this kludge is about 25% faster than your perl script > > on my machine > Nope. It's still more or less twice slower. :-D I guess it depends on the hardware: % time koleksi.pl # perl Word count: 126944 Unique word count: 11793 real0m1.019s user0m0.992s sys 0m0.028s % ti

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Adrian Maier
On 10/31/07, Matt Emson <[EMAIL PROTECTED]> wrote: > Adrian Maier wrote: > > Hello, > > > > I'm seeking for advice about which is the best way to hold an array of > > class instances > > I need to access the elements using its position (like a regular > > array) , and also i'd like > > the structur

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vinzent Hoefler
On Wednesday 31 October 2007 11:17, Jonas Maebe wrote: > The regexp library is case 1. A program using that library is case 2. > Case 1 can be written in C because the original author prefers C. > Case 2 can be written in Pascal because you prefer Pascal. "Language > superiority" does not enter th

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
Heck, I'm not even a programmer, and this kludge is about 25% faster than your perl script on my machine Nope. It's still more or less twice slower. :-D [EMAIL PROTECTED]:~$ time perl koleksi.perl Word count: 126944 Unique word count: 11793 real0m0.208s user0m0.204s sys 0m0.00

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Jonas Maebe
On 31 Oct 2007, at 11:00, Bee wrote: It merely means you don't want to waste time on rewriting a perfectly good library simply because of abstract "language purity" reasons. It is completely irrelevant in what language a library is written if it works well with your program and does what

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ? (more pi fun)

2007-10-31 Thread Tom Verhoeff
On Tue, Oct 30, 2007 at 07:36:39PM +0200, Musan Antal wrote: > The discussion about PI reminds me another funny quote: > > The primary purpose of the DATA statement is to give names to > constants; instead of referring to pi as 3.141592653589793 at every > appearance, the variable PI can be given

[fpc-pascal] fast text processing

2007-10-31 Thread Jeff Pohlmeyer
Heck, I'm not even a programmer, and this kludge is about 25% faster than your perl script on my machine program koleski; {$MODE OBJFPC} {$H+} uses classes, strings; var f: text; s:ansistring; wc:longint=0; wl, ul:TStringList; i,n:LongInt; begin assign(f, 'Koleksi.dat'); reset

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
It merely means you don't want to waste time on rewriting a perfectly good library simply because of abstract "language purity" reasons. It is completely irrelevant in what language a library is written if it works well with your program and does what you want. Yes. If C is very good, I won't

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
To give you a head start, check out: http://svn.freepascal.org/svn/fpc/trunk/packages/base/regexpr/ You read my mind! I've just been thinking about to use fpc's regex unit. :D It needs testing and fixing. How is it compare with regex that comes from FPC 2.0.4? I still can't upgrade to fpc 2

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Jonas Maebe
On 31 Oct 2007, at 10:40, Bee wrote: If you just want to show off, the easiest is simply making a FPC header to pcre, it might be useful even. Making a header on top of other libraries written by other languages is showing that FPC is lack of powerful units/libraries. It merely means yo

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Vincent Snijders
Bee schreef: If you just want to show off, the easiest is simply making a FPC header to pcre, it might be useful even. Making a header on top of other libraries written by other languages is showing that FPC is lack of powerful units/libraries. For some particular cases maybe it's alright. F

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Bee
If you just want to show off, the easiest is simply making a FPC header to pcre, it might be useful even. Making a header on top of other libraries written by other languages is showing that FPC is lack of powerful units/libraries. For some particular cases maybe it's alright. For example head

Re: [fpc-pascal] Arrays of objects

2007-10-31 Thread Matt Emson
Adrian Maier wrote: Hello, I'm seeking for advice about which is the best way to hold an array of class instances I need to access the elements using its position (like a regular array) , and also i'd like the structure to grow when I add more elements TObjectList If you want specific non type

Re: [fpc-pascal] Speed

2007-10-31 Thread Jilani Khaldi
I hear the Intel C compilers and Fortran compilers and Ada compilers are better optimized for certain things since FPC/delphi are generally desinged for GUI programming. ;-) C/Fortran yes, Ada no; there exists no Intel Ada compiler. False. There's no speed penalty for writing in Ada vs C. They

[fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-31 Thread Musan Antal
The discussion about PI reminds me another funny quote: The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of

Re: [fpc-pascal] Speed

2007-10-31 Thread Jonas Maebe
On 31 Oct 2007, at 00:47, L wrote: And I'm sure you know you can always use GOTO statements when you really need speed out of loops Actually, in current FPC versions that will more often than not cause slowdowns, because the compiler cannot optimize as well when goto's are used. Jona

[fpc-pascal] Arrays of objects

2007-10-31 Thread Adrian Maier
Hello, I'm seeking for advice about which is the best way to hold an array of class instances I need to access the elements using its position (like a regular array) , and also i'd like the structure to grow when I add more elements. Fpc has 'dynamic arrays' , and also there several classes li

Re: [fpc-pascal] fast text processing

2007-10-31 Thread Marco van de Voort
> > TStrings is meant for GUI purposes. It's design and implementation are > > not optimized. > > Then its our task to optimize it more (and more) so it could as fast as > Perl. What I meant here is using standard or default FPC's > classes/units. ;) I don't count any third parties class/units/l