[fpc-pascal] Speed
mm
m2 at ellipsa.net
Wed Oct 31 01:01:54 CET 2007
bartek a écrit :
> On Tuesday 30 October 2007 22:07:21 Valdas Jankūnas wrote:
>> P.S. Where i can read tips about writing fast FP code?
>
> FP is no Java. You get what you write. If you don't use virtual functions in
> OO-code, there are no hidden performance killers.
> First identify the bottleneck in your program (SubCalculate) with valgrind
> (Which you did). Now you can check this code by looking at the assembler
> output of the fp compiler. "fpc -alrnt ..." You can use this a base for more
> handoptimizing assembler code.
There, one should be careful. The best is to avoid to write embedded
assembler routines. With FPC, the register convention is not the same
with embedded routines than with ordinary ones (at least for x86
processors, for the others I don't know).
mm
http://www.ellipsa.net/
More information about the fpc-pascal
mailing list