Re: Compiling PHP with -O3

From: Date: Wed, 13 Dec 2000 00:05:56 +0000
Subject: Re: Compiling PHP with -O3
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-41099@lists.php.net to get a copy of this message
On Tue, 12 Dec 2000, Mark J. Hershenson wrote: > Out of curiosity, I have been attempting to compile PHP with "-O3" and not > "-O2" optimization. I changed Zend/Makefile and ./config_vars.mk to do it. > > It seems to work just fine so far. I haven't done any speed tests to see if > it's good or bad, but I've done it. > > Having satiated my curiosity, I would be interested in now knowing whether > -O3 is actually a good thing to do. > > * If not, why not? > * If so, can this be made into a "configure" option for PHP in the future > for those people with fast computers who want that little extra pop? > > > > Mark J. Hershenson > markhers@green-ant.com > http://www.green-ant.com/ > Generally -O3 is a Bad Thing for programs with more than a modicum of complexity. It causes some functions to be compiled inline instead of normally. Taking the address of a function is sometimes used to simulate polymorphic behavior under C. Nobody knows what problems could happen when taking the address of an inlined function, simply because such a thing can never happen (and if it ever does, you can be sure that all the people out there with degrees in CompSci can take their diplomas and wipe their behinds with them :) ). Instead the build just breaks fatally. -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.dev (#41099) next »