[fpc-pascal] Re: Register variables slowing down floating point operations

Marcos Douglas md at delfire.net
Fri May 13 16:08:54 CEST 2011

On Fri, May 13, 2011 at 9:54 AM, cobines <cobines at gmail.com> wrote:
> 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.

So, not to use the option -O in i386?
When I compile FPC sources, on Win32 XP SP3, using make, the option is used.

I'm confusing now...

Marcos Douglas

More information about the fpc-pascal mailing list