Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread L505
> writeln('Let''s combine a short string with a wordstring.. (press enter)'); > readln; > sstring:= ', interesting world.'; > WordStrConcat(sstring, wordstr1); // no memory allocated sorry, forgot to include the actual shortstring overloaded function - my copy and paste skills are getting

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread L505
> IMHO this whole discussion is nonsense. For basic path related stuff, > ansistring is good enough, and if findfirst/findnext are still limiting with > the current memmgr (afaik we changed to Micha's one since those original > tests). > > Moreover, if the weak point of ansistrings is the heap copy

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread Jonas Maebe
On 20 May 2006, at 22:39, Marco van de Voort wrote: - Can turning implict excepctions off in core parts improve ansistring performance? Implicit exceptions are already turned of for the entire compiler. Jonas ___ fpc-devel maillist - fpc-devel

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread Marco van de Voort
> On 20 May 06, at 11:43, L505 wrote: > > > more useful than longstrings. > > > > Admitting that C-language style programming (*char) is more practical and > > real world than > > Pascal programming? > > ;-) Well, that depends. I certainly don't think > that *char is more practical for string

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread Michael Van Canneyt
On Sat, 20 May 2006, Tomas Hajny wrote: > > > Regarding unit Dos - providing PChar versions of > > > some routines might be of general use, probably > > > more useful than longstrings. > > > > Admitting that C-language style programming (*char) is more practical and > > real world than > > Pas

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread Tomas Hajny
On 20 May 06, at 11:43, L505 wrote: > > . > > . > > > have tight custom units with no end user units like sysutils. One way to > > > accomplish > this, > > > like I've already mentioned, is to use shortstring/longstring/array of > > > string/ based > Dos > > > unit, using shortstrings where ne

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread L505
> . > . > > have tight custom units with no end user units like sysutils. One way to > > accomplish this, > > like I've already mentioned, is to use shortstring/longstring/array of > > string/ based Dos > > unit, using shortstrings where necessary, arrays of strings where > > necessary, and ar

Re: Re[4]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread L505
> Also, using some compiler trickery can be done to optimize usage of > AnsiStrings so we can avoid use of PChars, but of course this will > have to wait a bit. Or programmer trickery - the fpc souce already contains lots of programmer trickery around ansistrings such as using uniquestring, setl

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread L505
> Forgive me if I'm saying BS but it's been about 10 years since I > programmed in TurboPascal (and used ShortStrings), but don't > ShortStrings use the size they are declared with? And 255 is just > default size (if no size is specified)? The shortstring type does, but you can use a pointer to a

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-20 Thread Tomas Hajny
On 18 May 06, at 13:50, L505 wrote: . . > have tight custom units with no end user units like sysutils. One way to > accomplish this, > like I've already mentioned, is to use shortstring/longstring/array of > string/ based Dos > unit, using shortstrings where necessary, arrays of strings where

Re: Re[4]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Flávio Etrusco
On 5/19/06, Пётр Косаревский <[EMAIL PROTECTED]> wrote: Sorry, these two letters were accidentally sent personally. To Felipe Monteiro de Carvalho: > > probably Windows will become totally utf16 (not really unicode, but > > at least utf16) really soon (at least in newer versions in a way > > in

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Daniël Mantione
Op Fri, 19 May 2006, schreef Flávio Etrusco: > Forgive me if I'm saying BS but it's been about 10 years since I > programmed in TurboPascal (and used ShortStrings), but don't > ShortStrings use the size they are declared with? And 255 is just > default size (if no size is specified)? Of course.

Re: Re[2]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Daniël Mantione
Op Fri, 19 May 2006, schreef Flávio Etrusco: > > Free Pascal is Delphi compatible. > > I know that FPC aims to be Delphi-compatible, but it's not always the > case, as e.g. the WideStrings were reference-counted until a couple of > months ago. > So you are saying that in this is specific case F

Re: Re[2]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Flávio Etrusco
On 5/19/06, Daniël Mantione <[EMAIL PROTECTED]> wrote: Op Thu, 18 May 2006, schreef Flávio Etrusco: > > L> Dynamic arrays can be very handy and I never knew anyone who avoids > > L> them. Of course if your array has fixed length there's no reason > > L> to use a dynamic array either. > > L> Fo

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Flávio Etrusco
On 5/19/06, Daniël Mantione <[EMAIL PROTECTED]> wrote: Op Fri, 19 May 2006, schreef Micha Nelissen: > On Fri, 19 May 2006 18:29:29 +0100 > Peter Vreman <[EMAIL PROTECTED]> wrote: > > > There are already some complains about the memory usage. Increasing the > > string size adds a lot more overh

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Daniël Mantione
Op Fri, 19 May 2006, schreef Micha Nelissen: > On Fri, 19 May 2006 18:29:29 +0100 > Peter Vreman <[EMAIL PROTECTED]> wrote: > > > There are already some complains about the memory usage. Increasing the > > string size adds a lot more overhead. Especially for all the small labels > > like .L1

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Micha Nelissen
On Fri, 19 May 2006 18:29:29 +0100 Peter Vreman <[EMAIL PROTECTED]> wrote: > There are already some complains about the memory usage. Increasing the > string size adds a lot more overhead. Especially for all the small labels > like .L1 etc. Already using longstrings will add 3 bytes for the leng

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Peter Vreman
> That's one solution, that's not the only solution. Very right. It is a trade-off. Do you fix the shortstring issue and continue to get their benefits, or do you abandon them, rewrite large parts of the compiler and pay the performance/memory usage price? There are already some complains abo

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Peter Vreman
I think you guys may be living in a 255 cave, simply because that's all we have to deal with at this time. Some say that ansistrings might be the way to go using sysutils - personally I think sysutils has no place in the compiler core and the compiler core should have tight custom units with

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Peter Vreman
Also assembler symbols/labels should get extended to strings > 255 in the future because there is already a bug open in which it is demonstrated that it is possible to create too long labels which makes a program uncompilable. Or some scheme derived which makes sure that labels never get lar

Re[4]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Пётр Косаревский
Sorry, these two letters were accidentally sent personally. To Felipe Monteiro de Carvalho: > > probably Windows will become totally utf16 (not really unicode, but > > at least utf16) really soon (at least in newer versions in a way > > incompatible with current ones). > > A small correction, ut

Re: Re[2]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-19 Thread Daniël Mantione
Op Thu, 18 May 2006, schreef Flávio Etrusco: > > L> Dynamic arrays can be very handy and I never knew anyone who avoids > > L> them. Of course if your array has fixed length there's no reason > > L> to use a dynamic array either. > > L> Fortunately it's no very often that one falls in Borland's

Re: Re[2]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-18 Thread Flávio Etrusco
On 5/18/06, Пётр Косаревский с mail.ru <[EMAIL PROTECTED]> wrote: L> Can someone tell me how slow/fast a dynamic array is compared to a fixed one? Say you used L> a dynamic array of chars or dynamic array of shortstrings - would the dynamic array be L> slow on a general basis? Maybe we will hav

Re: Re[2]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-18 Thread Felipe Monteiro de Carvalho
But it's only a matter of time: probably Windows will become totally utf16 (not really unicode, but at least utf16) really soon (at least in newer versions in a way incompatible with current ones). A small correction, utf16 is a type of unicode. thanks, -- Felipe Monteiro de Carvalho __

Re[2]: [fpc-devel] Re: dominant short strings in compiler source

2006-05-18 Thread ϸ�� ����������� � mail.ru
L> Can someone tell me how slow/fast a dynamic array is compared to a fixed one? Say you used L> a dynamic array of chars or dynamic array of shortstrings - would the dynamic array be L> slow on a general basis? Maybe we will have to resort to benchmarks using the cpu timer. L> And then there is

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-18 Thread Daniël Mantione
Op Thu, 18 May 2006, schreef L505: > That's one solution, that's not the only solution. Very right. It is a trade-off. Do you fix the shortstring issue and continue to get their benefits, or do you abandon them, rewrite large parts of the compiler and pay the performance/memory usage price?

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-18 Thread L505
> > Also assembler symbols/labels should get extended to strings > 255 in the > > future because there is already a bug open in which it is demonstrated that > > it > > is possible to create too long labels which makes a program uncompilable. > > Or some scheme derived which makes sure that labels

Re: [fpc-devel] Re: dominant short strings in compiler source

2006-05-18 Thread Daniël Mantione
Op Thu, 18 May 2006, schreef Thomas Schatzl: > Also assembler symbols/labels should get extended to strings > 255 in the > future because there is already a bug open in which it is demonstrated that it > is possible to create too long labels which makes a program uncompilable. > Or some scheme d

[fpc-devel] Re: dominant short strings in compiler source

2006-05-18 Thread Thomas Schatzl
Hello, From: Jonas Maebe <[EMAIL PROTECTED]> On 17 mei 2006, at 20:19, L505 wrote: We wouldn't have to use sysutils yet.. we could make a custom Dos unit which used "longstrings" instead of short strings, but keep the old Dos unit for compatibility.. This still means that someone has to fini