[fpc-devel]class as parameter?

Florian Klaempfl Florian.Klaempfl at gmx.de
Thu Sep 14 11:17:19 CEST 2000

peter at freepascal.org schrieb:
> > Hello ,
> >
> >   Sorry for misleading you... The problem was not in class parameter
> >   really..
> >
> >   Seems to be AnsiString variables (which I used in the other
> >   function) are handled very slowly - dunno maybe it's in their
> >   deinitialization or initialization. They are just too damn slowly. I don't
> >   know why it is so... I guess if that could be changed overall speed
> >   will increase much.
> Ansistrings require initialization/finalization and thus (implicit) exception
> handling in the procedure.

I've some ideas how this could be improved:
- the exceptaddr record is stored on the stack
- the buf as well
=> saves two new and two dispose calls
- exceptaddr is a threadvar => the thread specific address
  could be retrieved at procedure entry and stored
  on the stack as local var as well

Much better would be a C++ like exception handling implementation
with tables but this would require a lot of work.

More information about the fpc-devel mailing list