Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13147 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59300 invoked by uid 1010); 4 Oct 2004 18:38:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 59253 invoked from network); 4 Oct 2004 18:38:00 -0000 Received: from unknown (HELO jan.prima.de) (83.97.50.139) by pb1.pair.com with SMTP; 4 Oct 2004 18:38:00 -0000 Received: from BAUMBART (pD95F871C.dip.t-dialin.net [::ffff:217.95.135.28]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Mon, 04 Oct 2004 18:37:59 +0000 Date: Mon, 4 Oct 2004 20:37:51 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <644987353.20041004203751@marcus-boerger.de> To: Sebastian Bergmann CC: internals@lists.php.net In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] GCC/CFLAGS Benchmark for HEAD and PHP_5_0 From: helly@php.net (Marcus Boerger) Hello Sebastian, could you please repeat the tests for php 4.3 to see the interesting difference? Also how about providing a spreadsheet for a better overiew? How did you do the timeings, i assume time command? And what CPU did you us, especially how much cache arewe talking about? best regards marcus Monday, October 4, 2004, 8:30:47 PM, you wrote: > I ran the Zend/bench.php script with PHP 5.0 and PHP 5.1 compiled with > GCC 3.3 and GCC 3.4 using different optimizations on my Intel Pentium-M > laptop: > HEAD (PHP 5.1.0-dev) > GCC 3.3.4 (-march=pentium3) > -O0: 48.602 > -Os: 29.920 > -O1: 31.349 > -O2: 29.029 > -O3: 29.644 > GCC 3.4.2 (-march=pentium-m -mtune=pentium-m) > -O0: 48.966 > -Os: 26.286 > -O1: 29.253 > -O2: 29.100 > -O3: 27.767 > -fprofile-{generate|use} -Os: 24.216 > -fprofile-{generate|use} -O1: 26.575 > -fprofile-{generate|use} -O2: 26.339 > -fprofile-{generate|use} -O3: 25.537 > PHP_5_0 (PHP 5.0.3-dev) > GCC 3.3.4 (-march=pentium3) > -O0: 58.394 > -Os: 42.570 > -O1: 43.454 > -O2: 42.092 > -O3: 42.066 > GCC 3.4.2 (-march=pentium-m -mtune=pentium-m) > -O0: 59.272 > -Os: 35.853 > -O1: 38.275 > -O2: 37.989 > -O3: 41.020 > -fprofile-{generate|use} -Os: 33.926 > -fprofile-{generate|use} -O1: 36.853 > -fprofile-{generate|use} -O2: 35.335 > -fprofile-{generate|use} -O3: 38.897 > For the -fprofile-{generate|use} builds I used the Zend/bench.php > script, too, to generate the profile information. If we were to add > Makefile target (like GCC itself ("make profiled-bootstrap")) to the > PHP build that makes use of -fprofile-{generate|use} it would make > sense to use "make test" to generate the profiling information. > When I find the time I will repeat the benchmark on my AMD Athlon64 box > because I think the small L1/L2 caches of the laptop CPU affect the > performance of the bigger code generated through optimizations. You can > clearly see that code optimized for size (-Os) is faster than the more > aggressive -O1, -O2, and -O3 optimization levels. > -- > Sebastian Bergmann http://www.sebastian-bergmann.de/ > GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- Best regards, Marcus mailto:helly@php.net