Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Evolution of gcc as seen by qlop
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
sam_i_am
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2003
Posts: 131

PostPosted: Wed May 20, 2020 8:15 pm    Post subject: Evolution of gcc as seen by qlop Reply with quote

Got a chuckle seeing the time taken to compile gcc over the years:

Code:

2010-06-06T17:39:53 >>> sys-devel/gcc-4.4.3-r2: 30 minutes, 28 seconds
2010-10-30T16:19:09 >>> sys-devel/gcc-4.4.4-r2: 1 hour, 12 minutes, 35 seconds
2011-10-10T13:18:18 >>> sys-devel/gcc-4.5.3-r1: 1 hour, 31 minutes, 10 seconds
2013-04-20T10:45:48 >>> sys-devel/gcc-4.6.3: 1 hour, 34 minutes, 9 seconds
2013-10-28T18:36:56 >>> sys-devel/gcc-4.7.3-r1: 2 hours, 21 minutes, 52 seconds
2014-11-23T11:25:20 >>> sys-devel/gcc-4.8.3: 2 hours, 47 minutes, 45 seconds
2015-10-30T09:53:19 >>> sys-devel/gcc-4.9.3: 2 hours, 57 minutes, 41 seconds
2018-03-04T09:12:47 >>> sys-devel/gcc-6.4.0-r1: 5 hours, 29 minutes, 5 seconds
2019-12-28T07:52:47 >>> sys-devel/gcc-8.3.0-r1: 7 hours, 35 minutes, 29 seconds
2019-12-28T23:44:48 >>> sys-devel/gcc-9.2.0-r2: 9 hours, 3 minutes, 35 seconds
2019-12-30T14:31:20 >>> sys-devel/gcc-9.2.0-r2: 9 hours, 20 minutes, 58 seconds

FYI, this is a Intel Atom D510@1.66GHz and yes, I've not deleted emerge.log since I bought it in 2010 and still serving as a file server while consuming about 12W :) I was sticking with gcc 4 until it went EOL.

Edit: It might be not having enough memory (only 2GB) for later version of gcc.
_________________
Sam
Back to top
View user's profile Send private message
paluszak
Apprentice
Apprentice


Joined: 28 Jun 2004
Posts: 229
Location: Warsaw, Poland

PostPosted: Wed May 20, 2020 9:03 pm    Post subject: Reply with quote

You can try to lower the number of concurrent compile jobs for packages like gcc to reduce swapping. I don't know what you have in your make.conf, but if you have "-j5" or something like this, low RAM might be the bottleneck here. I'm not saying that you'll get down to 30 minutes with new gcc versions, but I believe your box should be able to churn out newer versions of gcc in less than 9h, unless you set flags like pgo or lto.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6474

PostPosted: Thu May 21, 2020 9:25 am    Post subject: Reply with quote

You can really see the dropoff when it started heavily using C++ internally after 4.8…
Back to top
View user's profile Send private message
sam_i_am
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2003
Posts: 131

PostPosted: Fri May 22, 2020 12:34 pm    Post subject: Reply with quote

I have "-j3" for MAKEOPTS. Should try reducing it to two (CPU does have two cores).
_________________
Sam
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 690

PostPosted: Fri May 22, 2020 1:05 pm    Post subject: Reply with quote

I remember the good old days of compiling gcc on my amd k6 266mhz box with 48MB ram doing linuxfromscratch around 2001. Forgot exact times but pretty sure it was taking far less time than current gcc+pgo takes on my 6/12 cpu :|

Later I recall trying to compile openoffice org on it.. but that... went into swapping hell. Thankfully I replaced it with a athlon mp 2x2GHz box with 4GB ram in early 2003 :)
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2112
Location: Frankfurt, Germany

PostPosted: Fri May 22, 2020 7:23 pm    Post subject: Reply with quote

Ionen wrote:
I remember the good old days of compiling gcc on my amd k6 266mhz box with 48MB ram doing linuxfromscratch around 2001. Forgot exact times but pretty sure it was taking far less time than current gcc+pgo takes on my 6/12 cpu :|

Exactly as anticipated: :D
  • Moore's law: the number of transistors in a dense integrated circuit (IC) doubles about every two years...

  • Gates's law: the speed of software halves every 18 months...
Back to top
View user's profile Send private message
UlFie
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2011
Posts: 110
Location: Wuppertal

PostPosted: Fri May 22, 2020 10:41 pm    Post subject: Reply with quote

You forgot what Niklaus Wirth's wikipedia page calls
  • Wirth's law: Software is getting slower more rapidly than hardware becomes faster.

Wirth attributes it to Martin Reiser (that's not the file system developer/convicted murderer whose first name is Hans). Reading his article A Plea for Lean Software is certainly a must.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2685
Location: Canada

PostPosted: Sat May 23, 2020 9:00 am    Post subject: Reply with quote

I wonder, what did we gain for all this time ?

I guess the increase in the compilation time is there to match the speed of increase of major version number ?
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 835

PostPosted: Sat May 23, 2020 10:15 am    Post subject: Reply with quote

AFAIR one of the developers said one gcc processing step time varies with the 4th power of the input size. That'll be one of the cleverer optimization steps; couple that with the ever increasing complexity of the targets for which it's compiling, you get a massive increase in processing time.

The bad news is that the same law probably applies to other compilers such as llvm.
_________________
Greybeard
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2685
Location: Canada

PostPosted: Sat May 23, 2020 8:06 pm    Post subject: Reply with quote

Goverp wrote:
AFAIR one of the developers said one gcc processing step time varies with the 4th power of the input size. That'll be one of the cleverer optimization steps; couple that with the ever increasing complexity of the targets for which it's compiling, you get a massive increase in processing time.

The bad news is that the same law probably applies to other compilers such as llvm.



And in this case we are talking about gcc compiling itself :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum