Sender: jur AT rz DOT hu-berlin DOT de Message-ID: <373F3AA2.A446D611@informatik.hu-berlin.de> Date: Sun, 16 May 1999 21:37:38 +0000 From: Jens-Uwe Rumstich Organization: TUSCON X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.2.5 i586) MIME-Version: 1.0 To: pgcc AT delorie DOT com Subject: Benchmark PGCC vs EGCS on a K6-2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: pgcc AT delorie DOT com Hi! After some discussions about the performance of pgcc versus egcs I decided to make a little benchmark for myself. Since the results had some surprises for me I decided to post them in this mailing list :-) I am using the mpeg-viewer mpeg_play 2.3 I found on an old Linux-CD (1996;) and compiled it with several different options, trying to find the best for each compiler. I have a K6-2, which seems to be not that well supported by EGCS/PGCC. Of course I know that this little benchmark does not say that much, but perhaps someone can read the results and can improve PGCC. Comments are welcome :-) There are several things which are remarkabel IMHO: - allthough EGCS does not have specific K6-options, the fastest combination wsas found with EGCS, not with PGCC - even on the K6 PGCC creates better code with PentiumPro-option than with K6-Option, but there is an improvement with enabled K6-optimizing. - both compilers create worser code with O4 than with O3 - pgcc creates worser code with -fomit-frame-pointer than without. This should not be the case as the speed improvement with egcs shows. Testsystem: K6-2/300, DFI-Board with VIA MVP3, 128MB PC100-SDRAM Program used: mpeg_play 2.3 called with: ./mpeg_play TP_U9A.mpg -dither color -framerate 0-no_display (means that everything is only decoded, not shown on screen and done as fast as possible). TP_U9A.mpg is an MPG1-File about Ultima9 from the GameStar6/99. It is 40MB long (fits completly in the file cache) and has 6533 pictures. It was run with each options 4 times and the results of the first run were ignored (to make sure everything is in the cache). If the results looked strange, I run it more often... cu Jens-Uwe PS: aehm, are there any reasons, why the def_align in i386.c for the K6 is set to 0 instead of 5 (32 bytes cache alignment) or atleast 4 ?? PGCC 1.1.3 ========== pgcc 1.1.3 -mk6 -O3 -fomit-frame-pointer -fno-exceptions ******************************************************** Real Time Spent (After Initializations): 183.821808 secs. Avg. Frames/Sec: 35.539853 Real Time Spent (After Initializations): 184.616447 secs. Avg. Frames/Sec: 35.386880 Real Time Spent (After Initializations): 184.380268 secs. Avg. Frames/Sec: 35.432208 pgcc 1.1.3 -O3 -fomit-frame-pointer -fno-exceptions *************************************************** Real Time Spent (After Initializations): 185.193693 secs. Avg. Frames/Sec: 35.276579 Real Time Spent (After Initializations): 185.471253 secs. Avg. Frames/Sec: 35.223787 Real Time Spent (After Initializations): 185.250618 secs. Avg. Frames/Sec: 35.265739 pgcc 1.1.3 -mk6 -O3 -fomit-frame-pointer **************************************** Real Time Spent (After Initializations): 186.992771 secs. Avg. Frames/Sec: 34.937179 Real Time Spent (After Initializations): 186.833707 secs. Avg. Frames/Sec: 34.966924 Real Time Spent (After Initializations): 186.062526 secs. Avg. Frames/Sec: 35.111853 pgcc 1.1.3 -mk6 -O3 ******************* Real Time Spent (After Initializations): 182.880916 secs. Avg. Frames/Sec: 35.722699 Real Time Spent (After Initializations): 183.410874 secs. Avg. Frames/Sec: 35.619480 Real Time Spent (After Initializations): 182.983724 secs. Avg. Frames/Sec: 35.702629 pgcc 1.1.3 -mk6 -O3 -fno-exceptions *********************************** Real Time Spent (After Initializations): 182.924257 secs. Avg. Frames/Sec: 35.714236 Real Time Spent (After Initializations): 183.213352 secs. Avg. Frames/Sec: 35.657882 Real Time Spent (After Initializations): 183.133637 secs. Avg. Frames/Sec: 35.673403 Real Time Spent (After Initializations): 183.015210 secs. Avg. Frames/Sec: 35.696487 pgcc 1.1.3 -mpentiumpro -O3 *************************** Real Time Spent (After Initializations): 171.465415 secs. Avg. Frames/Sec: 38.100978 Real Time Spent (After Initializations): 171.653590 secs. Avg. Frames/Sec: 38.059210 Real Time Spent (After Initializations): 171.400694 secs. Avg. Frames/Sec: 38.115365 pgcc 1.1.3, -mpentiumpro -O3 -fno-exceptions -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 ****************************************************************** Real Time Spent (After Initializations): 175.591467 secs. Avg. Frames/Sec: 37.205680 Real Time Spent (After Initializations): 175.119116 secs. Avg. Frames/Sec: 37.306036 Real Time Spent (After Initializations): 173.986480 secs. Avg. Frames/Sec: 37.548895 Real Time Spent (After Initializations): 174.135745 secs. Avg. Frames/Sec: 37.516709 pgcc 1.1.3 -mk6 -O4 -fno-exceptions *********************************** Real Time Spent (After Initializations): 184.924530 secs. Avg. Frames/Sec: 35.327925 Real Time Spent (After Initializations): 184.726301 secs. Avg. Frames/Sec: 35.365836 Real Time Spent (After Initializations): 184.071585 secs. Avg. Frames/Sec: 35.491627 Real Time Spent (After Initializations): 184.470675 secs. Avg. Frames/Sec: 35.414843 pgcc 1.1.3 -mk6 -O4 ******************* Real Time Spent (After Initializations): 185.441264 secs. Avg. Frames/Sec: 35.229484 Real Time Spent (After Initializations): 185.830535 secs. Avg. Frames/Sec: 35.155686 Real Time Spent (After Initializations): 185.214553 secs. Avg. Frames/Sec: 35.272606 Linux-options ;) pgcc 1.1.3 -mk6 -O3 -fno-exceptions -malign-loops=2 -malign-jumps=2 -malign-functions=2 *************************************************************************************** Real Time Spent (After Initializations): 184.769374 secs. Avg. Frames/Sec: 35.357591 Real Time Spent (After Initializations): 185.692047 secs. Avg. Frames/Sec: 35.181905 Real Time Spent (After Initializations): 185.002588 secs. Avg. Frames/Sec: 35.313020 EGCS 1.1.2 ========== egcs 1.1.2, -m486 -O3 -fno-exceptions ************************************* Real Time Spent (After Initializations): 190.884759 secs. Avg. Frames/Sec: 34.224838 Real Time Spent (After Initializations): 190.683782 secs. Avg. Frames/Sec: 34.260911 Real Time Spent (After Initializations): 190.718268 secs. Avg. Frames/Sec: 34.254715 egcs 1.1.2, -mpentium -O3 -fno-exceptions ****************************************** Real Time Spent (After Initializations): 186.900943 secs. Avg. Frames/Sec: 34.954345 Real Time Spent (After Initializations): 186.828668 secs. Avg. Frames/Sec: 34.967867 Real Time Spent (After Initializations): 186.844797 secs. Avg. Frames/Sec: 34.964848 egcs 1.1.2, -mpentiumpro -O3 -fno-exceptions ****************************************** Real Time Spent (After Initializations): 182.603100 secs. Avg. Frames/Sec: 35.777049 Real Time Spent (After Initializations): 182.046141 secs. Avg. Frames/Sec: 35.886506 Real Time Spent (After Initializations): 181.567837 secs. Avg. Frames/Sec: 35.981042 Real Time Spent (After Initializations): 182.650236 secs. Avg. Frames/Sec: 35.767816 egcs 1.1.2, -mpentiumpro -O3 -fno-exceptions -fomit-frame-pointer *************************************************************** Real Time Spent (After Initializations): 170.441731 secs. Avg. Frames/Sec: 38.329815 Real Time Spent (After Initializations): 169.476114 secs. Avg. Frames/Sec: 38.548205 Real Time Spent (After Initializations): 169.432797 secs. Avg. Frames/Sec: 38.558060 Real Time Spent (After Initializations): 170.260373 secs. Avg. Frames/Sec: 38.370643 egcs 1.1.2, -mpentiumpro -O4 -fno-exceptions -fomit-frame-pointer *************************************************************** Real Time Spent (After Initializations): 171.048528 secs. Avg. Frames/Sec: 38.193839 Real Time Spent (After Initializations): 170.722887 secs. Avg. Frames/Sec: 38.266691 Real Time Spent (After Initializations): 170.492269 secs. Avg. Frames/Sec: 38.318453 (Linux-Options;) egcs 1.1.2, -mpentiumpro -O3 -fno-exceptions -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 ******************************************************************* Real Time Spent (After Initializations): 166.893144 secs. Avg. Frames/Sec: 39.144808 Real Time Spent (After Initializations): 167.056820 secs. Avg. Frames/Sec: 39.106455 Real Time Spent (After Initializations): 167.049761 secs. Avg. Frames/Sec: 39.108107 egcs 1.1.2, -mpentiumpro -O3 ***************************** Real Time Spent (After Initializations): 182.227430 secs. Avg. Frames/Sec: 35.850805 Real Time Spent (After Initializations): 181.508442 secs. Avg. Frames/Sec: 35.992816 Real Time Spent (After Initializations): 182.136821 secs. Avg. Frames/Sec: 35.868640