On Mon, 17 Jan 2005 13:33:18 +0900, "Stephen J. Turnbull" said:
Moving to xemacs-beta.
>>>>> "vin" == Vin Shelton <acs(a)xemacs.org> writes:
vin> Thank you, but I agree with Daryl Okahata's assessment if
vin> gcc-3.4.2 with certain aggressive optimizations requires code
vin> like this,
Does anybody have any idea what optimizations (besides -Os ;-)
actually do anything to speed up XEmacs?
-march=pentium4 seems to be the next biggest winner after -Os. I've never
encountered code where -O3 helped much - maybe for numerical crunching all the
loop unrolling helps, but for most real-life code, the code shrinkage caused
by -Os wins due to L1 i-cache and L2 cache occupancy issues.
I've not found any flags that help a measurable amount past -O2/-Os -march=pentium4.
I'm sure there's 1 or 2 .c files in xemacs that would get 5 or 10% faster with
hand-tweaking of the flags, but the seconds saved with said tweaking are outweighed
by the hours spent identifying the tweaks. At that point, you're better off
profiling and looking for algorithmic wins.