[GRLUG] Pentium 4 and Gentoo Linux?

Philip Robar philip.robar at gmail.com
Wed Jun 19 19:11:50 EDT 2013


I’m hoping that someone, like Mike Mol - our resident Gentoo advocate, might know the answer to this (and save me hours of experimenting): Will compiling Gentoo specifically for Intel P4/Netburst with GCC, Intel or LLVM make a noticeable difference on a general purpose desktop as opposed to using a generically compiled distribution?

Background: One of the reasons that Intel reverted from the P4’s Netburst architecture is that to take full advantage of it you had to compile your code specifically for it, with a compiler that knew about it intimately (in the same way that “real” RISC CPUs needed compilers specifically targeted to them) (1)—which, given the huge body of existing binaries and CPUs of the time, didn’t happen. (In particular Netburst has very long pipelines, so branch prediction misses were very costly.)

I found lots of articles comparing P4s vs other CPUs, but most are windows based and as such used precompiled benchmarks so they aren’t of any real help. I did find one article where compiling for P4 made a huge improvement for a specific math program (SPM (2)) and a short discussion about Arch Linux having optimized kernels (3). The latter lead me to an article that said, that at least for Core architecture CPUs, kernel optimization alone makes only a small, but measurable difference using building the kernel as a benchmark. In short, Intel was able to keep competitive, in the absence of optimized binaries, by ramping up clock speed and cache size at the expense of power consumption and heat.

So, do any of the current compilers (Intel, GCC, LLVM) generate Netburst optimized code such that compiling Gentoo specifically for it would make a noticeable difference on a general purpose desktop of that era?

(I know that this question is completely irrelevant nowdays, but I’ve always been curious as to the answer.)



(1) At Sun, for instance, we compiled Solaris with Sun’s compilers (which of course had intimate knowledge about SPARC CPUs) using flags which effectively said, “optimize for the latest version of SPARC, but don’t suck on the older versions.”
(2) http://imaging.mrc-cbu.cam.ac.uk/imaging/SpmWithPentium4
(3) http://forum.slitaz.org/topic/slitaz-use-all-the-power-of-a-intel-core-i3-and-ddr3-ram-type-memory


Phil
—
Defective by Design: 27” iMacs: Shame on Apple for not acknowledging and fixing the screen dimming problem.



More information about the grlug mailing list