[fpc-pascal] Re: Register variables slowing down floating point operations
cobines at gmail.com
Fri May 13 14:54:18 CEST 2011
2011/5/13 Ben <ben.smith.lists at gmail.com>:
> On 12/05/2011 20:54, cobines wrote:
>> I'm running it on Windows XP i386, compiled with FPC 2.5.1 17430.
> I tried this on my system which runs 64-bit Linux with FPC 2.4.3 (64-bit).
> Using -O, -O2 or -O3 command line parameters. In each case, the
> generated executable runs exactly the same. They actually have the exact
> same result: 828ms
> So here, with or without "optimization", it makes zero difference. Which
> is weird in it's own way.
On x86_64 it seems MMX instructions are used with or without
optimizations enabled. Those instructions can operate on memory as
well as on registers so there is no additional step where registers
are written to memory.
So I tried with "fpc -OpPENTIUM ..." but MMX instructions are not
generated anyway for i386.
I tried on Linux i386 and have the same thing, so this is only on i386 I think.
More information about the fpc-pascal