From: Michael Widenius Date: December 6 2000 12:35am Subject: Compile options List-Archive: http://lists.mysql.com/internals/198 Message-Id: <14893.35257.567384.144200@narttu.mysql.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! >>>>> "Antony" == Antony T Curtis writes: Antony> Since most people would be using GCC 2.95.x nowadays, I think it should Antony> be a good idea to change the default optimisation level in the Antony> configure.in file from "-O6" to "-O2"... Antony> In the 2.95.x compiler, setting -O3 can cause dangerous optimisations Antony> which would break applications. Antony> The "-O6" option only made any sense on the old 2.7 compilers. We have tested MySQL quite extensively under -O6 and -O3, so -O3 should be safe. Note however that if the user is using pgcc, then -O6 should give you some better performance.. Antony> However, enabling "-fexpensive-optimizations" would appear to be Antony> relatively safe. I shall try to do a full test in the REAL near future which optimization will give MySQL the best speed! Antony> Also - here are some additional tips for compiling for 64bittyness under Antony> AIX using GCC 2.95 (I already change the configure.in and run autoconf) Antony> $ OBJECT_MODE=64 \ >> CC="gcc -pipe -maix64 -Wa,-many" \ >> CXX="g++ -pipe -maix64 -Wa,-many" \ >> CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \ >> MAKE="gmake" \ >> ./configure --without-docs --without-debug --with-low-memory Antony> to compile, the libtool shell script has to me modified, adding Antony> "-maix64" after the two instances where "-shared" occour and then to Antony> compile, simply run Antony> $ OBJECT_MODE=64 gmake Antony> (GNU make must be used, IBM make fails) Antony> Surprisingly enough, the compiled output is a smaller than the 32-bit Antony> version. Response times appear to be good however I haven't had much Antony> time to do objective comparisons with the 32bit binaries. Tim, do you have any ideas of how to make the libtool change without causing trouble for others ? Antony> (IBM's POWER architecture appears to use 32bit fixed length instructions Antony> which may account for the smaller binaries) Antony> The latest version of AIX shouldn't need the "-Wa,-many" option but Antony> since all it does is disable the opcode verification within IBM's Antony> assembler, it should be harmless and it avoids the bugs in the older AIX Antony> assemblers. Thanks for the information! Regards, Monty