[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?
From: |
Felix Winkelmann |
Subject: |
Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default? |
Date: |
Mon, 03 Nov 2014 15:35:41 +0100 (CET) |
From: Peter Bex <address@hidden>
Subject: Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?
Date: Mon, 3 Nov 2014 09:04:27 +0100
> On Mon, Nov 03, 2014 at 08:49:47AM +0100, Felix Winkelmann wrote:
>> From: John Cowan <address@hidden>
>> Subject: Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?
>> Date: Sun, 2 Nov 2014 17:38:39 -0500
>>
>> > Peter Bex scripsit:
>> >
>> >> Am I going completely mad and am I missing something obvious? Is there
>> >> a good reason why optimizing for speed isn't the default?
>> >
>> > It's no more than a guess, but historically -O2 and -O3 tickled bugs that
>> > didn't appear at -O1. Probably someone (Felix?) fell over such a bug
>> > long ago, removed the -On argument, saw the bug go away, and left it
>> > at that. Ghu knows chicken's output is a torture test for C compilers.
>>
>> That's indeed the case. -O3 is not always reliable and can trigger
>> C-compiler bugs, depending on the exact make and version. I remember
>> encountering at least one, some time ago.
>
> I've also seen a GCC bug on NetBSD even without the optimization options.
>
>> The produced C code is
>> actually not that stressful (as compared to say, Gambit, which can
>> produce huge C functions, which make register-allocation a tough job
>> for the compiler). Nevertheless, the code produced by CHICKEN is not
>> what C compilers usually see.
>
> How about restoring the optimization option to the defaults and seeing
> what breaks? For me it was highly unexpected that CHICKEN was producing
> completely unoptimized code, and I'm pretty sure I'm not the only one,
> so if this doesn't break on too many systems, it's a saner default.
> If it's too aggressive, we could try -O2 instead or even -O1.
-Os should be sufficient, it is the default optimization level used by
Apple, for example.
felix
- [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, Peter Bex, 2014/11/02
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, John Cowan, 2014/11/02
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, Felix Winkelmann, 2014/11/03
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, Peter Bex, 2014/11/03
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, Sven Hartrumpf, 2014/11/03
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, Peter Bex, 2014/11/03
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, John Cowan, 2014/11/03
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?, Sven Hartrumpf, 2014/11/05
- Re: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?,
Felix Winkelmann <=