Am 14.02.2016 um 12:47 schrieb Giuliano Colla: > Il 14/02/2016 11:12, Graeme Geldenhuys ha scritto: >> But then, I think such non-realword tests don't prove much. > > Except that the implementation of inc(something) should be given a look, > as it's always been sold as faster than something:=something+1 >
No really. It is not a matter of +1 vs. inc but how it is compiled: as add or lea. And the decision add vs. lea is not straight forward. It depends on the surrounding code and the exact core. So without a detailed analysis of the generated assembler with regard to the used core any tests about it are useless. In theory, a compiler could decide very good if add or lea is better. But this decision applies only to a certain core and not in general. So for a all-purpose compiler this makes little sense. If your application really depends on this, rewrite the hotspots in C and use the icc to compile it. It knows about these detais. _______________________________________________ fpc-pascal maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
