Gentoo Archives: gentoo-user

From: Alec Ten Harmsel <alec@××××××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] necessary use flgas
Date: Wed, 24 Jun 2015 12:29:27
Message-Id: 20150624122909.GA525@apio.adsroot.itcs.umich.edu
In Reply to: Re: [gentoo-user] necessary use flgas by Alec Ten Harmsel
1 On Wed, Jun 24, 2015 at 01:13:40PM +0200, Alan McKinnon wrote:
2 > On 23/06/2015 15:05, behrouz khosravi wrote:
3 > > Hello everyone.
4 > >
5 > > I really like to have control over my machine as much as possible. In
6 > > this way I will learn a lot, so I am trying to remove all the default
7 > > use flags and control them manually.
8 >
9 >
10 > Here's some good advice:
11 >
12 > Don't do that. See below.
13 >
14
15 Nonsense - do that. If your goal is to learn how stuff works and you're
16 already reasonably familiar with C/C++ so you can debug any strange
17 errors that can happen, have fun. Just don't think you'll get any real
18 work done ;). i.e. it might be good to do this in a virtual machine and
19 still have a stable system for work.
20
21 >
22 > > I just don't know which "global" use flags are absolutely necessary to
23 > > the system to make it snappier or secure.
24 >
25 > That's a bit of a nonsensical line of thought, as what you think you
26 > want doesn't really exist.
27 >
28 > ...
29 >
30 > Put "-march=native" in CFLAGS
31 >
32
33 Yes. Also, properly setting CPU_FLAGS_X86 is another thing that can
34 speed up software *if* said software supports any special instruction
35 sets. Most "normal desktop software" like web browsers, email clients,
36 terminals, editors, etc. probably will not get a whole lot of benefit
37 either way, since most of this software is generally not CPU-bound and
38 is instead network/disk bound.
39
40 In the mornings I primarily use my desktop for reading email and
41 browsing news with firefox (mostly on sites with minimal JavaScript),
42 and I have yet to see my load averages climb higher than maybe 0.5.
43
44 Any software that does anything requiring lots of math will get a boost
45 from this type of stuff, though; graphics editing, most things in sci-*
46 categories, audio/video transcoding, etc.
47
48 Alec
49
50 P.S. Just realized I don't have "-march=native" in my CFLAGS. Time to
51 rice - could be getting 1% better performance. ;)
52
53 P.P.S. Also, on 1% better performance: My professor for the compilers
54 class I took used to (maybe still does) work at Google. Apparently
55 Google sees a <1% increase in performance as *the best thing ever*,
56 because it can save them a bunch of money in infrastructure and power.
57 Apparently Google are the ultimate ricers.