[MacPorts] #13335: python25 is compiled without optimization,
2x slower on mac os 10.5, others?
MacPorts
trac at macosforge.org
Sun Nov 18 08:42:43 PST 2007
#13335: python25 is compiled without optimization, 2x slower on mac os 10.5,
others?
---------------------------+------------------------------------------------
Reporter: bulk at modp.com | Owner: macports-dev at lists.macosforge.org
Type: defect | Status: new
Priority: High | Milestone:
Component: ports | Version: 1.5.2
Keywords: |
---------------------------+------------------------------------------------
Hiya,
while installing python2.5 on my system, I happened to notice that I
didn't see the usual "-O2" option while gcc was compiling files. THen I
had a small benchmark program, and yes, it runs 2x slower than 10.5
/usr/bin/python on Mac OS 10.5.1
DEBUG: Environment: CXXFLAGS='-O2' CPPFLAGS='-I/opt/local/include'
CFLAGS='-O2'
but...
gcc -c -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
madd -DNDEBUG -D__DARWIN_UNIX03 -I. -I./Include -I/opt/local/include
-DPy_BUILD_CORE -o Parser/parser.o Parser/parser.c
(to use one example)
I looked into the portfile
platform darwin 9 {
configure.post_args-append OPT="-D__DARWIN_UNIX03"
}
I think this may be clobbering the CFLAGS def. I added
platform darwin 9 {
configure.post_args-append OPT="-O3 -D__DARWIN_UNIX03"
}
and it compiles correctly (but I need to remove and then install
everything). I'm pretty sure there must be a way of reading $CFLAGS from
the env, but I don't know enough about TCL (I tried $::env(CFLAGS), nope)
or MacPorts to know.
WIth -O3, macports python runs about 10% faster than the Mac 10.5.1 python
thanks.
--nickg
--
Ticket URL: <https://svn.macosforge.org/projects/macports/ticket/13335>
MacPorts </projects/macports>
Ports system for Mac OS
More information about the macports-tickets
mailing list