[fpc-devel] Benchmark for FreePascal

Marco van de Voort marcov at stack.nl
Sun Dec 11 22:24:01 CET 2005


> > Op Sat, 10 Dec 2005, schreef darekM:
> > 
> > > Hi
> > > I've tested some of benchmark on 
> > > http://shootout.alioth.debian.org/
> > > 
> > > 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
> > > begin
> > >  readln(s);
> > > end;
> > 
> > The Shootout benchmarks should preferably be implemented without unit 
> > classes to achieve the best memory usage results. 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.
> 
> Even then not. See my mail...
> 
> > 
> > Can you do the same to improve readln?
> 
> The problem is not the readln implementation, but the buffer size.

The said test has already been reviewed by Vincent aand me, however I still
must dig it up and send it to shootout. 

Iirc it is the speed of memory growth (the realloc) that is the problem,
not the textbuffer. Exponential memgrowth.




More information about the fpc-devel mailing list