[fpc-devel] Benchmark for FreePascal

Daniël Mantione daniel.mantione at freepascal.org
Sun Dec 11 17:19:45 CET 2005

Op Sun, 11 Dec 2005, schreef darekM:

> For me more important is speed, in real program we always use other units

The Shootout is about both speed, memory and lines of code. We're no. 3 in 
memory usage, and if the Shootout wouldn't measure some numbers 
incorrectly, we would be no.1. Let's not loose that position.

I agree that speed is in many situations more important than memory, but 
in a lot of software, you use, i.e. text editor, memory is more important.

> > Your code is welcome though to add to unit classes, allthough I currently
> > can't because it uses assembler code withotu Pascal alternative, i.e. it
> > would make the classes unit unavailable on the other processors FPC
> > supports.
> > 
> > 
> I know, in code are three funcion: findendLine, findEndLine2, findEndLine3 -
> there are propositions, please help me to make propers compilers conditions.
> Maybe strlBuf (rename to scanbuf ?) should be moved to system unit?

It can be moved into the strings unit, if we have also a Pascal 
implementation for non-i386 processors.

> > Can you do the same to improve readln?
> > 
> > 
> readln is more complicated, is compiler function, is so small buffer (only 128
> bytes) and reads char by char.
> I havent any idea to do this.

The compiler converts read/readln calls to calls to 
procedures in the rtl. fpc_Read_Text_ShortStr is the procedure to 
optimize. It is in the file text.inc.


More information about the fpc-devel mailing list