Re: optimization level
Lee <[email protected]> Sun, 1 Jan 2017 17:14:19 -0500
| Newsgroups | gmane.comp.web.privoxy.devel |
|---|---|
| Message-ID | <CAD8GWsuwhkw-8DJZsTf6yDZ=s+tYgNbZe425u5+T6sAc62hJzw@mail.gmail.com> |
On 1/1/17, Ian Silvester <[email protected]> wrote: > A fair question, and the only answer I have is that that was the level > suggested by Tobias Netzel when he compiled the PPC OS X binary :o) I'm wondering if it's one of those "personal preference" things. I'll trade off a larger executable for a faster program - eg. adding a TCP_BUFFER_SIZE define in project.h: #define BUFFER_SIZE 5000 #define TCP_BUFFER_SIZE 46720 /* LR */ /* -LR- pick a buffer size that's a multiple of 1460 * -LR- see http://sourceforge.net/mailarchive/message.php?msg_id=23602205 * -LR- One can slightly speed-up Privoxy in some situations by increasing the buffer "buf" * -LR- in jcc.c's chat(), trading off higher memory use for reduced context switching: * -LR- static void chat(struct client_state *csp) * -LR- { * -LR- char buf[TCP_BUFFER_SIZE]; -LR was: char buf[BUFFER_SIZE] */ I changed configure.in to if test "X$CFLAGS" = "X "; then # if CFLAGS were unset (see above) if test "$GCC" = yes; then CFLAGS="-O3" fi fi a while back & privoxy.exe is ~ 30KB larger using -O3 than it is using -O2. I haven't noticed any difference, but I haven't been looking either.. I was mainly concerned that privoxy didn't blow up. Lee > > My PGP public > key[http://diem.serveftp.net:8080/IanSilvesterPGPPublicKey.asc] > > On Sun, 1 Jan 2017, at 15:28, Lee wrote: >> Just out of curiosity .. why not >> CFLAGS="-O3 ... >> >> -O3 makes a larger, but [hopefully? really?] faster, object file. >> >> Lee >> >> On 12/31/16, Ian Silvester <[email protected]> wrote: >> > Update of /cvsroot/ijbswa/OSXPackageBuilder >> > In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10842 >> > >> > Modified Files: >> > build.sh >> > Log Message: >> > Added compilation optimisation flags to improve performance at the cost >> > of >> > increased binary size >> > >> > >> > Index: build.sh >> > =================================================================== >> > RCS file: /cvsroot/ijbswa/OSXPackageBuilder/build.sh,v >> > retrieving revision 1.9 >> > retrieving revision 1.10 >> > diff -C2 -d -r1.9 -r1.10 >> > *** build.sh 19 Jan 2016 02:54:43 -0000 1.9 >> > --- build.sh 31 Dec 2016 17:24:03 -0000 1.10 >> > *************** >> > *** 88,92 **** >> > autoconf >> > >> > ! /usr/bin/env CFLAGS="${CFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" >> > LDFLAGS="${LDFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" ./configure >> > ${OPTS} >> > >> > # >> > --- 88,92 ---- >> > autoconf >> > >> > ! /usr/bin/env CFLAGS="-O2 -mdynamic-no-pic ${CFLAGS} ${SYSROOT} >> > ${ARCH} >> > ${MACOSX_VERSION}" LDFLAGS="${LDFLAGS} ${SYSROOT} ${ARCH} >> > ${MACOSX_VERSION}" >> > ./configure ${OPTS} >> > >> > # >> > >> > >> > ------------------------------------------------------------------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > ijbswa-commits mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/ijbswa-commits >> > >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> Ijbswa-developers mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/ijbswa-developers > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Ijbswa-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ijbswa-developers > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot