Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26061 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34869 invoked by uid 1010); 15 Oct 2006 12:42:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34854 invoked from network); 15 Oct 2006 12:42:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2006 12:42:05 -0000 Authentication-Results: pb1.pair.com header.from=news@sea.gmane.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.2 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.2 main.gmane.org Linux 2.5 (sometimes 2.4) (4) Received: from [80.91.229.2] ([80.91.229.2:58542] helo=ciao.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/8A-42420-99C22354 for ; Sun, 15 Oct 2006 08:42:03 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GZ5JR-0001Cl-SZ for internals@lists.php.net; Sun, 15 Oct 2006 14:41:53 +0200 Received: from 115.84-48-233.nextgentel.com ([84.48.233.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Oct 2006 14:41:53 +0200 Received: from sb by 115.84-48-233.nextgentel.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Oct 2006 14:41:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Sun, 15 Oct 2006 14:41:38 +0200 Lines: 49 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 115.84-48-233.nextgentel.com User-Agent: Thunderbird 1.5.0.7 (X11/20060917) X-Enigmail-Version: 0.94.1.0 Sender: news Subject: Impact of CFLAGS on GOTO and SWITCH executers From: sb@sebastian-bergmann.de (Sebastian Bergmann) Today I built PHP 4.4.4, PHP 5.0.5, PHP 5.1.6, and current PHP_5_2 (the last two each with CALL, GOTO, and SWITCH VMs) with GCC 3.4.6 and GCC 4.1.1 with -O{0|1|2|3|s} [1]. CFLAGS: -march=pentium-m -msse3 -O{0|1|2|3|s} -pipe configure options: --disable-cgi --disable-all I let each of the resulting binaries run the PHP_5_2/Zend/bench.php script (five times). I noticed that for the following configurations the running of the bench.php script results in a segmentation fault: GCC 3.4.6 PHP 5.1.6 GOTO: -O1 SWITCH: -O1 PHP_5_2 GOTO: -O0, -O1, -O2, -O3, -Os SWITCH: -O0, -O1, -O2, -O3, -Os GCC 4.1.1 PHP 5.1.6 GOTO: -O0 SWITCH: -O0 PHP_5_2 GOTO: -O0, -O1, -O2, -O3 SWITCH: -O0, -O1, -O2, -O3 What strikes me as odd are the segmentation faults when PHP is built with -O0 (no optimizations). These results also beg the question how well supported/tested the two alternative executers, GOTO and SWITCH, are. -- [1] Yes, these means I build 80 PHP binaries. -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69