Re: [fpc-devel] TList slowness in classes

2004-12-28 Thread Ales Katona
Vincent Snijders wrote:
Michalis Kamburelis wrote:
I felt that results of this discussion are so important that I 
created a page in FPC wiki about it:

http://www.freepascal.org/wiki/index.php/Avoiding_implicit_try_finally_section 

There's an URL to mail archives of this discussion, and a small demo 
program that shows trick proposed by Mattias how to avoid this 
implicit try...finally block.

(I also created Writing_efficient_code page, that links between FPC 
page and Avoiding_implicit_try_finally_section page).

Michalis.
Did you try this with today compiler?
I think Peter Vreman turned of implicit try finally for resource strings.
Vincent.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
I can confirm that since the new CVS version TList is much faster than 
before. Also it seems arrays got faster but I'm unsure as I deleted my 
old benchmarks.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] TList slowness in classes

2004-12-28 Thread Michael Van Canneyt


On Fri, 24 Dec 2004, Mattias Gaertner wrote:

> On Fri, 24 Dec 2004 12:13:15 +0100 (W. Europe Standard Time)
> Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
> > On Fri, 24 Dec 2004, Mattias Gaertner wrote:
> >[...]
> > > And creates the implicit exception frame only in RaiseIndexError.
> >
> > I have changed the procedure.
>
> Talking about TList slowness:
> In the last years TList and TStringList became slower and slower.
> Are there any alternatives in classes.pp? A simple TList providing only the 
> very
> basics, less checks, no notifications, less virtuals, reordered IFs ... ?

TList has almost no virtuals, so I doubt you will find anything to
change there. The notifications can be optimized, Dean Zobec wanted to
try this. This is as far as I'm concerned the biggest showstopper.

If you want to make an ancestor, make it TAbstractList. But to make this
work, you'll need a virtual Get() method, which is more or less what you
wanted to avoid in the first place.

> If this TBaseList (or TSimpleList or TQuickList or THumbleList) would
> be the ancestor of TList, existing code could easily be improved - the
> user only needs to rename his TList to TBaseList.
> Or maybe give this base thing the correct name. I never understood,
> why Borland named it 'list'. AFAIK in computer science a list is a
> linked chain of elements. While TList is an dynamic array with some methods.

It is.

I suspect that TList is also often used in the wrong way. The basic
methods (get/set) are quite small and fast. Only the growing mechanism
is slow. People should set the capacity before adding anything to the
list. If you don't do this, then each N calls to add() will need to do a
reallocation of the whole list...

Michael.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] gui console in windows

2004-12-28 Thread Rimgaudas Laucius



Hello,
 
i am interesting, what do you think about 
redirecting text streams not to windows console, but creating free pascal's own 
gui console (for example implementing it under -WX switch)? I mean to do 
something like graph unit is done now or unit wincrt in Virtual Pascal's 
rtl. Windows console looks like some relict derived from dos. We have problems 
with keybord drivers and text encoding in it (text prepared with 
windows editor needs to be encoder to dos cp when outputing if you want to 
see national characters properly). Different it's implementation 
in win9x and win2000,xp systems makes these problems deeper. 
 
Regards,
Rimgaudas Laucius
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


RE: [fpc-devel] gui console in windows

2004-12-28 Thread peter green
have you tried using virtual pascals wincrt unit with freepascal?

and if so does it compile and work?

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Rimgaudas
> Laucius
> Sent: 05 November 2004 00:07
> To: fpc-devel@lists.freepascal.org
> Subject: [fpc-devel] gui console in windows
> 
> 
> Hello,
> 
> i am interesting, what do you think about redirecting text streams not to
> windows console, but creating free pascal's own gui console (for example
> implementing it under -WX switch)? I mean to do something like 
> graph unit is
> done now or unit wincrt in Virtual Pascal's rtl. Windows console 
> looks like
> some relict derived from dos. We have problems with keybord 
> drivers and text
> encoding in it (text prepared with windows editor needs to be 
> encoder to dos
> cp when outputing if you want to see national characters properly).
> Different it's implementation in win9x and win2000,xp systems makes these
> problems deeper.
> 
> Regards,
> Rimgaudas Laucius
> 
> 
> ___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] small patch for db

2004-12-28 Thread Michael Van Canneyt


On Tue, 30 Nov 2004, Jesus Reyes wrote:

> Tfielddefs.assign handle fielddefs starting at index 1, it should
> start at index 0
>

Thanks. Applied.

Michael.


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] IE 9999 on second compiler run

2004-12-28 Thread peter green
im posting this direct to the list as the bug report system is down

www.p10link.net/iesecondcompile.tbz

extract the archive with tar -jxf and run the test script.

the first compile will succeed the second compile will exit with ie

the problem appears to happen when loading the lcore.ppu file on the second
compile of lsocket.pas



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] bug reporting system down

2004-12-28 Thread peter green

Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
in /FPC/html/bugs/bugs.php on line 11

Warning: MySQL Connection Failed: Access denied for user:
'[EMAIL PROTECTED]' (Using password: YES) in /FPC/html/bugs/bugs.php on line
11
An error occurred while executing an mYSQL query:

Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) in
/FPC/html/bugs/bugs.php on line 13

Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]'
(Using password: NO) in /FPC/html/bugs/bugs.php on line 13

Warning: MySQL: A link to the server could not be established in
/FPC/html/bugs/bugs.php on line 13
An error occurred while executing an mYSQL query:

Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] TList slowness in classes

2004-12-28 Thread Vincent Snijders
Michalis Kamburelis wrote:
I felt that results of this discussion are so important that I created a 
page in FPC wiki about it:

http://www.freepascal.org/wiki/index.php/Avoiding_implicit_try_finally_section 

There's an URL to mail archives of this discussion, and a small demo 
program that shows trick proposed by Mattias how to avoid this implicit 
try...finally block.

(I also created Writing_efficient_code page, that links between FPC page 
and Avoiding_implicit_try_finally_section page).

Michalis.
Did you try this with today compiler?
I think Peter Vreman turned of implicit try finally for resource strings.
Vincent.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: Re: [fpc-devel] TList slowness in classes

2004-12-28 Thread Yakov Sudeikin

>
>Talking about TList slowness:
>In the last years TList and TStringList became slower and slower. Are there 
>any alternatives in classes.pp? A simple TList providing only the very basics, 
>less checks, no notifications, less virtuals, reordered IFs ... ?

I think dynamic arrays are just what you are looking for.

var
 ii: array of integer;
 ss: array of string;

yakov


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] TList slowness in classes

2004-12-28 Thread Michalis Kamburelis
I felt that results of this discussion are so important that I created a 
page in FPC wiki about it:

http://www.freepascal.org/wiki/index.php/Avoiding_implicit_try_finally_section
There's an URL to mail archives of this discussion, and a small demo 
program that shows trick proposed by Mattias how to avoid this implicit 
try...finally block.

(I also created Writing_efficient_code page, that links between FPC page 
and Avoiding_implicit_try_finally_section page).

Michalis.
Michael Van Canneyt wrote:
On Fri, 24 Dec 2004, Mattias Gaertner wrote:

On Fri, 24 Dec 2004 11:49:10 +0100 (W. Europe Standard Time)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:

On Fri, 24 Dec 2004, Mattias Gaertner wrote:

On Fri, 24 Dec 2004 10:56:24 +0100 (W. Europe Standard Time)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:

If the answer is yes, then maybe it's safe to compile parts of FPC
sources in lists.inc (like TList.Get) inside {$IMPLICITEXCEPTIONS OFF} ?
Why not put it into a sub proc:
function TList.Get(Index: Integer): Pointer;
 procedure RaiseIndexError;
 begin
   Error(SListIndexError,Index);
 end;
begin
 If (Index<0) or (Index>=FCount) then
   RaiseIndexError;
 Result:=FList^[Index];
end;
The compiler detects that the sub can raise an exception.
And creates the implicit exception frame only in RaiseIndexError.

I have changed the procedure.
Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel