From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: andrey mirtchovski MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20020226030240.9F8F219A2A@mail.cse.psu.edu> Subject: [9fans] p9/linux/fbsd compiler shootout Date: Mon, 25 Feb 2002 20:05:02 -0700 Topicbox-Message-UUID: 55d928da-eaca-11e9-9e20-41e7f4b1d025 Hello, We spent the day here doing a simple compiler/os/p9-vs-the-world shootout.. Here's what we found... Machine: A single cpu 800mhz Athlon T-Bird system (k7). Each operating system was installed on a separate IBM Deskstar 30GB IDE drive. The video card used was NVidia TNT2, but that's not important since only plan9 ran any graphical interface (note: when attempting to test on P9 without rio the machine hung during ape/psh compilation). OS: Linux/RedHat 7.2, kernel 2.4.7 (ext3) standard install FreeBSD 4.5 fresh install (no softupdates turned on) Plan9 installed on-line (with kernel modification to accomodate NVidia graphics hardware) Software: The test was done using POV-Ray graphics/imaging sotware (www.povray.org).. We downloaded the latest 3.1 unix sources. The makefile for p9 was modified to compile under ape/psh. We removed most of the CFLAGS switches, set the compiler to pcc. The compile time reported under all OS's and compilers does *not* include time to compile libpng and zlib support. We used only POV-Ray - relevant files. Time given is the time it took to render a single frame of a predefined scene (explanation below). We chose to render using radiosity rather than ray-tracing, since radiosity is more computationaly intensive. The test is extremely floating-point heavy (or at least it should be -- after all it's graphics we're dealing with :). Each compilation resulted in a ppm image of size 1440015 bytes + 1910 bytes in an ASCII statistics file. POV-Ray keeps rough stats on its own, so the time reported is the actual time in seconds that POV-Ray thinks it was rendering (including initial parsing of the scene description file). All output was redirected to a file in order to avoid any console IO (this was not done for the compilation, though. The scene description could be found in: .../scenes/radios/rad2.pov in the POV-Ray distribution. Images generated were of size 800x600, in PPM format. Here is the string used to render them: (plan9 version given, others identical except for redirection syntax) povray +L/path/to/povray/libs rad2.ini +Irad2.pov +Oscene.ppm +FP +W800 +H600 -GA +GS >[2]out.txt For each platform/compiler pair we compiled two binaries -- one using the standard optimizations found in POV-Ray's makefile, the other without any optimization switches (e.g. gcc -c file.c). Povray uses the following optimizations: -O6 --finline-functions --ffast-math -m386 (deprecated in 3.0) Each compiler was given three runs, each run is reported. Some additional notes: FreeBSD 4.5 does not come with gcc 3.0, neither could it be found as a binary package. We had to compile it from the ports collection, but since it was a simple make; make install deal we got no optimization for it. It shows (compare the 3.0 results with the same fbsd using gcc 2.95 and a linux binary compiled with 3.0 under emulation)... --- Results (time in seconds): (please excuse bad formatting -- we elaborated on the idea of putting everything in an excel spreadsheet, but couldn't find any) OS/compiler/ optimization run #1 run #2 run #3 Compile time (mm:ss.ms) ------------------------------------------------ P9/8c/yes(?) 293 293 292 0:19.24 Lnx/3.0.2/yes 150 149 149 0:56.541 BSD/3.0.2/yes 170 170 170 0:55.04 BSD/3.0.2/yes 151 151 151 none (running linux binaries under emulation) Lnx/3.0.2/no 196 196 196 0:30.052 BSD/3.0.2/no 221 221 220 0:26.49 BSD/3.0.2/no 203 203 203 none (running linux binaries under emulation) Lnx/2.96/yes 147 147 148 0:56.848 BSD/2.95/yes 177 178 178 0:42.03 Lnx/2.96/no 203 204 203 0:55.620 BSD/2.95/no 208 208 208 0:18.76 ----- regards :) ps: reading the above forces you to agree not to use the information here in flammable, non-p9-related and in any way unscientific discussions :) pps: funny fact #430995: selecting gcc for installation on rh7.2 results in installing 220mb worth of dependencies. one of the more-importand ones is x-chat (or at least x-chat related)!