Jonas Maebe-2 wrote
> The reason is, as always, compatibility. FPC mode started as an  
> extension of the Turbo Pascal compatibility mode. In Turbo Pascal,  
> integer is 16 bits. In Delphi, it's 32 bits, so both in Delphi and in  
> ObjFPC modes, integer is 32 bits. Code that was written with integer =  
> 16 bits may no longer work the same if the size of the integer type is  
> changed to 32 bits (especially if overflow checking is off).
> ...
> If you want to compare with Delphi, it's better to compile the program  
> in Delphi mode. You should see the same 10% increase in FPC that you  
> see when you change it to longint.
> 
> Jonas

If I understood correctly, the FPC programmer in 2016 always should include
{$MODE DELPHI} or {$MODE ObjFPC} to avoid TurboPascal legacy that I use in
earlies 1990?
Ok, it's not so important, only a rhetorical question.

I retested in Delphi mode, the time is the same.
Changing type to integer with Delphi7 decrease the time from 215 to 155 msec
in my environment. FPC shows about 189 msec and the same 155 in delphi mode
with integer type.

So the default FPC mode seems to be significantly more slow than Delphi-mode
and ObjFPC-mode.



-----
--
Regards,
Serguei
--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Happy-tickets-benchmark-tp5724109p5724406.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to