[MacPorts] #13335: python25 is compiled without optimization, 2x slower on mac os 10.5, others?
#13335: python25 is compiled without optimization, 2x slower on mac os 10.5, others? ---------------------------+------------------------------------------------ Reporter: bulk@modp.com | Owner: macports-dev@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
#13335: python25 is compiled without optimization, 2x slower on mac os 10.5, others? ----------------------------+----------------------------------------------- Reporter: bulk@modp.com | Owner: mww@macports.org Type: enhancement | Status: new Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.5.2 Resolution: | Keywords: ----------------------------+----------------------------------------------- Changes (by nox@macports.org): * owner: macports-dev@lists.macosforge.org => mww@macports.org * priority: High => Normal * type: defect => enhancement * milestone: => Port Enhancements Comment: That's not a defect, that's an enhancement, nothing is broken. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13335#comment:1> MacPorts </projects/macports> Ports system for Mac OS
#13335: python25 is compiled without optimization, 2x slower on mac os 10.5, others? ----------------------------+----------------------------------------------- Reporter: bulk@modp.com | Owner: mww@macports.org Type: enhancement | Status: assigned Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.5.2 Resolution: | Keywords: ----------------------------+----------------------------------------------- Comment (by bulk@modp.com): Hi there, sorry for the delay. for the last comment, it was suggested to use: configure.cppflags-append -DDARWIN_UNIX03 that's not quite right (at least for 2.5.1_3 port file) me thinks Using this: platform darwin 9 { configure.cppflags-append -D__DARWIN_UNIX03 } compiled, and has optimization! (on 10.5 anyways). Doing -DDARWIN_UNIX03 did **not** work btw. thanks --nickg -- Ticket URL: <https://trac.macosforge.org/projects/macports/ticket/13335#comment:3> MacPorts </projects/macports> Ports system for Mac OS
#13335: python25 is compiled without optimization, 2x slower on mac os 10.5, others? ----------------------------+----------------------------------------------- Reporter: bulk@modp.com | Owner: mww@macports.org Type: enhancement | Status: closed Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.5.2 Resolution: fixed | Keywords: ----------------------------+----------------------------------------------- Changes (by mww@macports.org): * status: assigned => closed * resolution: => fixed Comment: thanks, I changed the line and incremented the revision; -- Ticket URL: <https://trac.macosforge.org/projects/macports/ticket/13335#comment:4> MacPorts </projects/macports> Ports system for Mac OS
#13335: python25 is compiled without optimization, 2x slower on mac os 10.5, others? ----------------------------+----------------------------------------------- Reporter: bulk@modp.com | Owner: mww@macports.org Type: enhancement | Status: reopened Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.5.2 Resolution: | Keywords: ----------------------------+----------------------------------------------- Changes (by bulk@modp.com): * status: closed => reopened * resolution: fixed => Comment: Ugh. Damn wiki formating screwed us up. So it's -D underscrore underscore DARWIN_UNIX03 as in (with proper wiki formating) {{{ configure.cppflags-append -D__DARWIN_UNIX03 }}} looks like we both got hit by this. Right now for 10.5 -DDARWIN_UNIX03 does not compile. Can you fix this? thanks, --nickg -- Ticket URL: <https://trac.macosforge.org/projects/macports/ticket/13335#comment:5> MacPorts </projects/macports> Ports system for Mac OS
#13335: python25 is compiled without optimization, 2x slower on mac os 10.5, others? ----------------------------+----------------------------------------------- Reporter: bulk@modp.com | Owner: mww@macports.org Type: enhancement | Status: closed Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.5.2 Resolution: fixed | Keywords: Python python25 ----------------------------+----------------------------------------------- Changes (by mww@macports.org): * keywords: => Python python25 * status: reopened => closed * resolution: => fixed Comment: Ugh, indeed - thanks for the hint, I just fixed it. -- Ticket URL: <https://trac.macosforge.org/projects/macports/ticket/13335#comment:6> MacPorts </projects/macports> Ports system for Mac OS
participants (1)
-
MacPorts