[fpc-devel] Benchmark for FreePascal

darekM darekm at emadar.com
Sun Dec 11 12:49:28 CET 2005

Daniël Mantione napisał(a):

>Op Sat, 10 Dec 2005, schreef darekM:
>>I've tested some of benchmark on 
>>I've see that reverse-complement benchmark
>><http://shootout.alioth.debian.org/benchmark.php?test=revcomp&lang=all> for
>>FPC is very slow. I discover, that problem is with readln, that function
>>consume about 90% of time. Because I use it in my program, I implemented new
>>version of reading files. My propositions is add tTextStream to unit Classes
>>using is very similar
>>while not eof do
>> readln(s);
>The Shootout benchmarks should preferably be implemented without unit 
>classes to achieve the best memory usage results.
For me more important is speed, in real program we always use other units

> 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?

>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.


More information about the fpc-devel mailing list