chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?


From: Peter Bex
Subject: [Chicken-hackers] Why isn't OPTIMIZE_FOR_SPEED the default?
Date: Sun, 2 Nov 2014 18:57:04 +0100
User-agent: Mutt/1.4.2.3i

Hi all,

After hitting my head against the wall why the numbers egg's division was
so much slower than Gauche while it is now using the same algorithm,
I noticed that some_pointer[x/2] was much slower than some_pointer[x>>1],
so the C compiler wasn't optimising this particular operation away, which
is pretty unusual I thought.

This led me to find out that CHICKEN was invoking gcc with -Os, but
not any other optimization options.  The Makefiles add -O3 when
OPTIMIZE_FOR_SPEED is defined, but -Os otherwise.  The README doesn't
even mention this important detail.

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 makes sense
that DEBUGBUILDs aren't optimized, but usually (anywhere except for
embedded uses), I'd expect performance to be more important than binary
size.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]