Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] GCC 4.7 unmasking
Date: Mon, 25 Feb 2013 21:57:59
Message-Id: CAGfcS_kqo3a9V9+sHSVqOos2OVYFpxu7ur2iY_wWhAv88QrNLw@mail.gmail.com
In Reply to: Re: [gentoo-dev] GCC 4.7 unmasking by "Diego Elio Pettenò"
1 On Mon, Feb 25, 2013 at 4:37 PM, Diego Elio Pettenò
2 <flameeyes@×××××××××.eu> wrote:
3 > On 25/02/2013 22:32, Rich Freeman wrote:
4 >> That isn't the same as saying that we can just break it in cases where
5 >> it actually is appropriate. Calculating scroll bar movement is
6 >> exactly the sort of thing that this flag was actually designed for -
7 >> you don't care if it is off by 1/100th of a pixel.
8 >
9 > Rich.. please... don't try to talk about things you don't understand.
10 >
11
12 A sword that cuts two ways - judging understanding by an email is a
13 dubious proposition, otherwise we wouldn't need job interviews. :)
14 It is just as likely that we're simply miscommunicating.
15
16 > If Chromium is not building *by itself* on -ffast-math, we should *not*
17 > support building it with it. Full stop.
18
19 Define what you mean by "building *by itself*" - I don't want to
20 assume I understand what you're getting at here. I certainly wasn't
21 suggesting that you could be able to run CFLAGS="-O2 -ffast-math"
22 emerge chromium and get anything usable. -ffast-math is a flag that
23 should be applied to specific functions or even parts of functions
24 where there is an understood performance vs accuracy tradeoff.
25
26 > It's not that adding -ffast-math loses the 1/100th precision on a scroll
27 > bar pixel: it has a truckload of changes to the whole mathematics in the
28 > code, which _among other things_ will break that scrollbar, because the
29 > calculation used to display it add up to a huge difference.
30
31 If you're just using it to calculate how many pixels down it is, it
32 certainly shouldn't be that inaccurate. If you're using it to do
33 pointer arithmetic or something then you're just going to get
34 segfaults. There are arithmetic functions in computing that are
35 discrete/functional in nature, and there are those which relate more
36 to real-world measurements. Adding a 0.001% error to a hash
37 calculation breaks a hash. Adding 0.001% error to a scientific
38 calculation where all the components have 1% measurement error is
39 insignificant.
40
41 > I would be wondering about it if it broke stuff that
42 > already is designed to rely on it, but even in that case, it's hard to
43 > actually say that it "broke", it's just "different".
44
45 This is the case I'm concerned with only. Agree somewhat on "broken"
46 being a loose term when the flag is intended to yield inaccurate
47 results. However, it probably is not intended to yield
48 grossly-inaccurate results. Then again, the bug cited things like 5
49 vs 7 and those are equivalent within an order of magnitude.
50
51 Rich

Replies

Subject Author
Re: [gentoo-dev] GCC 4.7 unmasking "Diego Elio Pettenò" <flameeyes@×××××××××.eu>