Now I am sure that somebody will point out that there are compiler directives or command-line options that will speed that up, but that's hardly the point.
Here we have two languages, of comparable functionality, and in terms of performance FPC is perceived as inferior.
And do they document which PRNG they use? FPC's
Random is documented to be a Mersenne Twister (though the generated sequence is
not guaranteed to be that of a raw MT) and MTs are known to be on the slower side of things. So maybe right here you're comparing the performance of one PRNG to another instead of compiler A to compiler B.
with version 3.2.2 (and 3.2.0) num+=1 is not allowed.
You should use num:=num+1;
perhaps there is a switch to enable +=, but you have not provided it.
C operators are enabled by default in the default configuration file.
something i've experienced with fpc but didn't know how to report it
i've done alots of benchmarks with defernet levels of optimization (-O1..4), the weird thig is all gives the same result
while on other compilers like gcc / vc you'll find for example -O3 produce much faster code than -O1
Development of optimizations is a work-in-progress. Also in general only code will benifit that does fit the corresponding optimization requirements (e.g. global variables will
never benefit from regvar optimizations, cause global variables are by definition volatile).