J
John Carter
It's an interesting thought. However, I wasn't able to get gcc 4.2.2 to do
some simpler things, like profile-based optimization, on the Ruby source, so
I wouldn't expect something that complex to work out of the box. There are a
lot of great things in gcc, but not many of them are as well tested as, say,
the standard modular C library or program, and, of course, the Linux kernel.
I'm not sure thats simpler... I also looked at that once and decided
there were some distinctly unsimple things going on.
If I'm right about kde, then yes, its a very well tested feature. Also
there would be major impetus from embedded systems users to use whole
program optimization features.
As far as I know, "-O3 -march=<your processor type>" is about the best you
can get out of gcc without a *lot* of work.
In the "medium work" category I suspect there are things relating to
function attributes and builtins that could get 5% or so more juice
(but tend to clutter the code with unportable improvements).
And there are a lot more things you can do at the Ruby source level
that have a bigger payoff than that does.
As always. My 100-10-1 rule of thumb is to expect speed up factors of up
to about 100x for using a much better algorithm, factors up to about
10x for code tweaks, factors up to 2x but usually near 1x for compiler
optimization tweaks.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : (e-mail address removed)
New Zealand