Gentoo Archives: gentoo-performance

From: BladE <blade@××××××.gr>
To: gentoo-performance@g.o
Subject: Re: [gentoo-performance] Re: (forw) -fbranch-probabilities optimisation
Date: Sat, 17 May 2003 23:34:41
Message-Id: 1053213818.6185.12.camel@b00-b0x.fasteweb.net
In Reply to: Re: [gentoo-performance] Re: (forw) -fbranch-probabilities optimisation by Chris Davies
1 Hello,
2
3 Nice project Mr. C.Davies. If you need to try the program to another
4 computer except the one or one's you have, please let me know. We can
5 test it on mine too. My computer has an Intel Pentium 3 Coppermine at
6 800mhz.
7
8 Have a nice day,
9
10 mario
11
12
13 On Sat, 2003-05-17 at 23:43, Chris Davies wrote:
14 > No, it shouldn't cause any instability.
15 >
16 > It merely modifies what the compiler does anyway, which is to provide hints to the processor about which branch it should speculatively execute.
17 >
18 > Thanks,
19 > C.Davies
20 >
21 > * Jonathan Chocron (chocronj_l@×××××.fr) wrote:
22 > > Hi,
23 > >
24 > > I am afraid I am not skilled enough to answer our question. However, I
25 > > am very interested in what you say. Do you know if this optimization might cause
26 > > some instability in the system ?
27 > >
28 > > I must say, I hav subscribed to that list about one week ago, and your
29 > > post is the first I have ever seen, so I would not worry about
30 > > cross-posting.
31 > >
32 > > Jonathan
33 > >
34 > > On Sat, 17 May 2003, Chris Davies wrote:
35 > >
36 > > > Sorry about the cross post, I didn't realise this list existed.
37 > > >
38 > > > ----- Forwarded message from Chris Davies <c.davies@×××××××.org> -----
39 > > >
40 > > > Hi,
41 > > >
42 > > > I had the idea to build -fbranch-probabilities optimisation into portage. This is where a sample run of data is taken using the program compiled with -fprofile-arcs, and that data then used to reorganise the object code so conditional branches are layed out in a more efficient manner.
43 > > >
44 > > > To give an idea about how much time this optimisation actually saves, I ran a test with bladeenc (an MP3 encoder) encoding an entire album of wav files. The CFLAGS used only differed by a the -fbranch-probabilities, and the test was run 5 times to get an average. The result was that the version with no branch data took 8.35.106s on average to complete the encoding, whereas the the optimised version took only 8.11.502s. The branch data was 64KBs in total.
45 > > >
46 > > > Does this sound like something we could work into portage? I initially had the idea of building patches for every package likely to be improved by this optimisation (mainly CPU bound ones) and just applying them to the package before compilation. The user could then choose wether or not to actually use the data by including or excluding -fbranch-probabilities in make.conf.
47 > > >
48 > > > Obviously I'd have to work up some kind of test rig to automatically generate arc data for packages, but that shouldn't be too much of a problem as long as we keep the number of packages under control. The only problem I can see is that -fbranch-probabilities spits out ugly warnings if no arc data is present, although in this situation gcc defaults back to it's standard behaviour (I think).
49 > > >
50 > > > Thoughts? Opinions?
51 > > > Thanks,
52 > > > C.Davies
53 > > >
54 > > >
55 > > > --
56 > > > gentoo-dev@g.o mailing list
57 > > >
58 > > > ----- End forwarded message -----
59 > > >
60 > > > --
61 > > > gentoo-performance@g.o mailing list
62 > > >
63 > > >
64 > >
65 > > --
66 > > Précision importante : les services de mon ancien fournisseur
67 > > d'adresse e-mail étant dernièrement décevant, je suis en train de
68 > > changer d'adresse. Veuillez donc m'écrire à chocronj@×××××××.com (il
69 > > suffit de répondre à ce mail).
70 > >
71 > > --
72 > > gentoo-performance@g.o mailing list
73 >
74 > --
75 > gentoo-performance@g.o mailing list
76 --
77 ---
78 ####################################
79 ## http://archon.teilam.gr:15586/ ##
80 ## ------------------------------ ##
81 ## mario saturno <blade@××××××.gr>##
82 ####################################
83
84 -----BEGIN PGP PUBLIC KEY BLOCK-----
85 Version: GnuPG v1.2.2 (GNU/Linux)
86
87 mQGiBD7FPO0RBACrQ/uxkBlJvYiTCj52xZV7QNKAtU3yV5hqVgtjWebWkuoIC7Ja
88 D7cyQoeYWIoEf54p6ZO6bVYt1GH6fmGTXxffHn0Oim0pxRCl9mKF1sRkYZjid6+H
89 dlsDvSqHkGpVUyBLZbiEu5bIjIBIKDBpdP1jsEwEqmmCAYK5vTBnCS+UQwCgsXJd
90 zuCVwk0Se3Ign13lR8N6L9kD/0cesKAOUVxU3opNei+m9bKMbtXQzmqdybQvyxkl
91 CbQMP9dJXXcI0fa7Z991j+pZ0cxj0teb5Y6+j7toMTKfamPDUj+f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hiLRVoLcc5
108 UyCddGZ6cZh/Hd9BwA78NakX8lyiTYPUStITum2SN22kmnRpAb5/svblud35y1Oo
109 Of186Qrqw/IZElm73OLS2TAjiEYEGBECAAYFAj7FPRYACgkQKnDUvXR1l/59yQCf
110 cZg+H5Xxsnr99tyjTWh7OkmdzoQAoKnD+Mu1msTqk055kAiFbaoIetym
111 =U1om
112 -----END PGP PUBLIC KEY BLOCK-----

Attachments

File name MIME type
signature.asc application/pgp-signature