From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <981e9fab3325f419f267dbb5e9f4937d@plan9.bell-labs.com> From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] GCC3.0 [Was; Webbrowser] In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-dheyuathxhjyqktvmbpkrfkayb" Date: Thu, 6 Feb 2003 09:24:11 -0500 Topicbox-Message-UUID: 50db96a0-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-dheyuathxhjyqktvmbpkrfkayb Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I looked at at the benchmarks. There are lots of times() calls in inner loops that are very low cost in Unix but pretty expensive in Plan 9. Why not do a run under iostats and post the results. It might be enlightening. --upas-dheyuathxhjyqktvmbpkrfkayb Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Wed Feb 5 23:18:21 EST 2003 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Wed Feb 5 23:18:18 EST 2003 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id A8DBF19991; Wed, 5 Feb 2003 23:18:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from fsc.cpsc.ucalgary.ca (fsc.cpsc.ucalgary.ca [136.159.2.3]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id D5B9C1998A for <9fans@cse.psu.edu>; Wed, 5 Feb 2003 23:17:01 -0500 (EST) Received: from imgw1.cpsc.ucalgary.ca (ons-imgw1 [192.168.1.66]) by fsc.cpsc.ucalgary.ca (8.12.7/8.12.7) with ESMTP id h164H0qd027839 for <9fans@cse.psu.edu>; Wed, 5 Feb 2003 21:17:00 -0700 Received: from csl (csl [136.159.5.22]) by imgw1.cpsc.ucalgary.ca (8.12.3/8.12.3) with ESMTP id h164GxMQ001840 for <9fans@cse.psu.edu>; Wed, 5 Feb 2003 21:16:59 -0700 From: andrey mirtchovski X-X-Sender: mirtchov@csl To: 9fans@cse.psu.edu Subject: Re: [9fans] GCC3.0 [Was; Webbrowser] In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavis-milter (http://amavis.org/) X-Spam-Status: No, hits=-0.6 required=7.5 tests=IN_REP_TO,SPAM_PHRASE_00_01,USER_AGENT_PINE version=2.43 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 5 Feb 2003 21:16:59 -0700 (MST) I've actually used gcc to compile something -- a simple cpu and memory benchmark called 'ubench'. I strongly desire such that the 'my OS is faster' flamewars continue on this list, that's why i'm posting a URL to the ubench source and compilation instructions for Plan9 (using the GCC3.0 port). Unfortunately I couldn't be bothered rewriting the benchmark for the native P9 compiler, so 'my compiler is faster' flame warriors will be left dissatisfied. The URL for ubench is: http://www.phystech.com/download/ubench.html to compile under plan9: % gunzip < ubench-0.32.tar.gz | tar xv % cd ubench-0.32 % # edit ubench.c and comment out syslog.h on line 25 % gnu/gsh $ gcc -o ubench signals.c cpubench.c membench.c ubench.c (alternatively, to compile with optimizations, do:) $ gcc -o ubench signals.c cpubench.c membench.c ubench.c -O2 $ ^D % strip ubench % ubench here are the highly scientific results I got: Celeron 900mhz (average ~40,000 in FreeBSD 4.7 w/ gcc2.95), the machine is a standalone 9pcdisk/kfs terminal: no optimizations: % ubench Unix Benchmark Utility v.0.3 Copyright (C) July, 1999 PhysTech, Inc. Author: Sergei Viznyuk http://www.phystech.com/download/ubench.html Plan9 1 0 generic pcdisk Ubench CPU: 23072 Ubench MEM: 14221 -------------------- Ubench AVG: 18646 % with -O2: % ubench Unix Benchmark Utility v.0.3 Copyright (C) July, 1999 PhysTech, Inc. Author: Sergei Viznyuk http://www.phystech.com/download/ubench.html Plan9 1 0 generic pcdisk Ubench CPU: 24992 Ubench MEM: 18097 -------------------- Ubench AVG: 21544 % Pentium 4, 2Ghz (average ~60,000 on FreeBSD 4.7 w/ gcc2.95, now the machine has FBSD 5.0 w/ gcc3.2 on it, but is booted in p9 so I couldn't test :), the machine is running as an auth/cpu/kfs server: cpu% ubench Unix Benchmark Utility v.0.3 Copyright (C) July, 1999 PhysTech, Inc. Author: Sergei Viznyuk http://www.phystech.com/download/ubench.html Plan9 1 0 generic pcauth Ubench CPU: 39110 Ubench MEM: 33350 -------------------- Ubench AVG: 36230 cpu% with -O2: cpu% ubench Unix Benchmark Utility v.0.3 Copyright (C) July, 1999 PhysTech, Inc. Author: Sergei Viznyuk http://www.phystech.com/download/ubench.html Plan9 1 0 generic pcauth Ubench CPU: 43528 Ubench MEM: 44170 -------------------- Ubench AVG: 43849 cpu% And something else: I just checked how ubench is compiled on freebsd (what optimizations are used) and gave the same arguments to plan9's gcc. The result is: $ gcc -o ubench signals.c cpubench.c membench.c ubench.c -O2 -Wall '-malign-loops=2' '-malign-jumps=2' '-malign-functions=2' -fomit-frame-pointer -s cpu% strip ubench cpu% ubench Unix Benchmark Utility v.0.3 Copyright (C) July, 1999 PhysTech, Inc. Author: Sergei Viznyuk http://www.phystech.com/download/ubench.html Plan9 1 0 generic pcauth Ubench CPU: 43863 Ubench MEM: 44170 -------------------- Ubench AVG: 44016 cpu% as with everything, those results should not be taken too seriously :) andrey --upas-dheyuathxhjyqktvmbpkrfkayb--