[fpc-pascal] Re: Shootout: k-nucleotide implementation (was: Which programming language is fastest?)

Lukasz Sokol el.es.cr at gmail.com
Mon May 9 12:06:04 CEST 2011


On 08/05/2011 21:25, Bernd wrote:
> Ok, I have looked at the example that was the slowest: 5 times slower than gcc.
> 
> k-nucleitide: http://shootout.alioth.debian.org/u32/benchmark.php?test=knucleotide&lang=all
> 
> The C++ code is giving me headaches from only looking at it. I am
> still not sure what the hell they have done (or cheated) to reach this
> speed. Looking at the Python example explains what the benchmark
> actually does in less than a screenpage.

Mmm..
4.45s to complete and log all make actions (C++ gnu g++)
0.11s to complete and log all make actions (Pascal Free Pascal)

we _are_ _compiling_ it faster ;)

and
132,656 kB vs 127,684 kB memory, we're actually _better_ than them ;)
and 2383 vs 2106 code length (well they're better here).

Maybe 
/usr/local/src/fpc-2.4.2.i386-linux/bin/fpc -FuInclude/fpascal -XXs -Oppentiumm -Cppentiumm -O3 -Cfsse2  -oFPASCAL_RUN knucleotide.fpascal-2.pas 

the command line also is the answer ? (is the Q6600 64bit ?)
also c++ code sports things like cpu affinity, while we don't...
or they try to _parallelize_ it behind the machines' back ?

Hard to say.

(Not that I know much about c++ generally)
:)
Lukasz
[...]

> Bernd




More information about the fpc-pascal mailing list