On 26 Jan 2002, at 14:45, John R Pierce wrote: > > http://www.slashdot.org has a link to http://open-mag.com on a new Intel > > compiler for Linux an M$ Windows. The new compiler makes use of the new > > instructions in the Pentium III and IV. Of course, the most important > > part of the Prime95 code does not get compiled at all, since it has > > already been handcoded. But it would be nice to know if a recompile with > > this compiler would improve throughput significantly, anyone? > > I believe the Intel C 5.0 compiler is based on Kai C++, which is hardly new. > Its also $500 per user per system on Linux. The MS Windows version requires > you to already have the MS Visual C++ 6.0 package, as this piggybacks on the > MS C tools. This isn't going to take the open source world by storm...
In any case it is rather doubtful that the compiler could make much difference to Prime95. The pieces coded in C are of the "run once" variety rather than being executed in every iteration. Actually Microsoft C/C++ (Visual Studio) does a pretty good job of outputting efficient code - as good as gcc on IA32 hardware. The only "extra instructions" in PIII which are of significant value for Prime95 are cache prefetch instructions, which are already exploited in the existing assembler code. And Prime95's P4 code already uses SSE2. I'd put significant money on George's code beating _any_ compiled implementation of the same algorithm for speed on any applicable hardware. (Obviously excluding emulated hardware environments - I don't know if Prime95 could be run in e.g. a Bochs virtual x86 environment, but, if it did, I guess it would be _very_ slow!) Where such a compiler would make a difference is in porting code to new or substantially different architectures; Glucas is already pretty good on IA32/linux, but a compiler "upgrade" might help get it a bit closer to Prime95. The difficulty with porting Prime95 to non- IA32 architectures is that so much of it is in assembler, which is not easy to port between architectures whilst retaining something approaching optimum efficiency. In fact it would be pretty much a total rewrite job. As John points implies, you've got to be pretty committed to shell out ~$500 per system for the privelege of compiling code on your own hardware. It would take a _really_ significant speed boost to make that sort of expenditure worthwhile. Regards Brian Beesley _________________________________________________________________________ Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers
