Re: [gentoo-dev] Re: ICC Profile

2008-07-19 Thread Rémi Cardona

Duncan wrote:

Has anyone done a study of -Os vs -O2 with gcc-4.3.x,


Just a quick note while on the subject : -Os is known to break some 
packages.


Although it has been a while since I've last had a full -Os system, 
there was a time when -Os was a _very_bad_idea_. That's why the Gnome 
Herd (and upstream Gnome) won't support anything more than -O2.


Of course, if anyone wants to use -Os to actually fix bugs... :)

Cheers

Rémi
--
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Adam Stylinski
I actually know somebody working at intel, maybe he can get them more involved.
-- 
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Branko Badrljica

BTW: Is ICC really worth the fuss ?
I have checked around and reported that newest gcc-4.3 is able to to 
catch and sometimes even outperform icc ( not always, naturally).


Big news seemed to be thatnew gcc si close and sometimes better than icc.

Is it any truth to that and if it is, what is the motive of having 
non-open icc option ?






Adam Stylinski wrote:

I actually know somebody working at intel, maybe he can get them more involved.
  


--
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Adam Stylinski
GCC 4.3 is catching up, but they are no where near utilizing SSE4 or SSE5 
instructions.  

http://blog.alphagemini.org/2008/03/icc-vs-gcc-43.html

He concludes that it's not worth pursuing, but I beg to differ.  Those are 
signifcant differences for a processor.
-- 
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Ciaran McCreesh
On Fri, 18 Jul 2008 10:24:58 -0400 (EDT)
Adam Stylinski [EMAIL PROTECTED] wrote:
 GCC 4.3 is catching up, but they are no where near utilizing SSE4 or
 SSE5 instructions.  
 
 http://blog.alphagemini.org/2008/03/icc-vs-gcc-43.html
 
 He concludes that it's not worth pursuing, but I beg to differ.
 Those are signifcant differences for a processor.

He doesn't establish whether the code in question is highly cpu-bound
or not when run on his system. For a lot of memory- and i/o-bound code,
there's little practical difference between gcc with optimisations
turned off and gcc with -frice-my-shorts except that the former
compiles an order of magnitude faster.

The more interesting question, then, is whether users run any
non-trivial cpu-bound programs. We know the applied science types do,
but they tend to be the ones who're doing clever things with icc
anyway. What about normal users?

-- 
Ciaran McCreesh


signature.asc
Description: PGP signature


Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Adam Stylinski
He's also doing it on a core 2 duo.  It would be interesting to compare this 
with some mildly legacy hardware (netburst pipelines) in order to see whether 
GCC does a comparable job.  My guess would be no, seeing as netburst was 
extremely ugly and complicated, only intel would be able to write a compiler 
that took advantage of it.  
-- 
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Richard Freeman

Ciaran McCreesh wrote:


The more interesting question, then, is whether users run any
non-trivial cpu-bound programs. We know the applied science types do,
but they tend to be the ones who're doing clever things with icc
anyway. What about normal users?



I'm sure they do on some occasion if they encode compressed audio/video, 
or when compressing data with zip/etc.  That is probably the biggest 
application of cpu-bound software.


Personally, I use -Os across the board when it doesn't break.  As you 
said I tend to be memory/IO bound, and optimizing for size helps with 
both (swapping causes IO).  I'd probably benefit from using -O3 on the 
aforementioned CPU-intensive apps.

--
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Ciaran McCreesh
On Fri, 18 Jul 2008 15:34:53 -0400
Richard Freeman [EMAIL PROTECTED] wrote:
 Ciaran McCreesh wrote:
  The more interesting question, then, is whether users run any
  non-trivial cpu-bound programs. We know the applied science types
  do, but they tend to be the ones who're doing clever things with icc
  anyway. What about normal users?
 
 I'm sure they do on some occasion if they encode compressed
 audio/video, or when compressing data with zip/etc.  That is probably
 the biggest application of cpu-bound software.

How much of that is memory bound? Of the things that aren't, how many
aren't written in assembly anyway? Of those things, what proportion of
the runtime is spent in those areas?

If you double the speed of something that takes up 2% of the overall
execution time, you can't measure the improvement.

Or looking at it the other way -- is there any reason to believe that
using icc (which can end up being a substantial pain in the arse, given
the way it tries to use gcc's c++ headers but doesn't support some of
the extensions or quirks that g++ does) will provide a genuine gain
for people who aren't already doing clever profile-directed trickery
anyway?

 I'd probably benefit from using -O3 on the aforementioned
 CPU-intensive apps.

The problem with -O3 is that function inlining can lead to a
substantial cache hit. Unless you're using profile-directed
optimisations, which Gentoo doesn't support, it's extremely hit and
miss as to whether O3 helps or hurts.

-- 
Ciaran McCreesh


signature.asc
Description: PGP signature


Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Richard Freeman

Ciaran McCreesh wrote:


How much of that is memory bound? Of the things that aren't, how many
aren't written in assembly anyway? Of those things, what proportion of
the runtime is spent in those areas?

If you double the speed of something that takes up 2% of the overall
execution time, you can't measure the improvement.

Or looking at it the other way -- is there any reason to believe that
using icc (which can end up being a substantial pain in the arse, given
the way it tries to use gcc's c++ headers but doesn't support some of
the extensions or quirks that g++ does) will provide a genuine gain
for people who aren't already doing clever profile-directed trickery
anyway?


The problem with -O3 is that function inlining can lead to a
substantial cache hit. Unless you're using profile-directed
optimisations, which Gentoo doesn't support, it's extremely hit and
miss as to whether O3 helps or hurts.



I agree with all of the above.   Gentoo is about choice, so if people 
want to make ICC work well more power to them.  I agree that it would be 
hard to make it THE ONLY system compiler.  For those who do try it I'd 
be really interested in their findings.

--
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] Re: ICC Profile

2008-07-18 Thread Adam Stylinski
Perhaps we could write a script that compiles packages in portage with both ICC 
and GCC and runs them with different flags.  I think there was an effort on the 
GCC side already to test flags with specific packages.  We can then have the 
script run time on the applications doing work (again, that's a lot of packages 
for a lot of different tasks).  If we can store these in the portage tree (yes, 
it's more metadata), the user can actually benefit well from the optimizations.
-- 
gentoo-dev@lists.gentoo.org mailing list