[Python-Dev] Anyone building Python --without-doc-strings?
R. David Murray
rdmurray at bitdance.com
Sat Jan 26 17:37:37 CET 2013
On Sat, 26 Jan 2013 17:19:32 +0100, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Sat, 26 Jan 2013 17:03:59 +0100
> Stefan Krah <stefan at bytereef.org> wrote:
> > Stefan Krah <stefan at bytereef.org> wrote:
> > > I'm not sure how accurate the output is for measuring these things, but
> > > according to ``ls'' and ``du'' the option is indeed quite worthless:
> > >
> > > ./configure CFLAGS="-Os -s" LDFLAGS="-s" && make
> > > 1.8M Jan 26 16:36 python
> > > ./configure --without-doc-strings CFLAGS="-Os -s" LDFLAGS="-s" && make
> > > 1.6M Jan 26 16:33 python
> >
> > The original contribution *was* in fact aiming for "10% smaller", see:
> >
> > http://docs.python.org/release/2.3/whatsnew/node20.html
> >
> > So apparently people thought it was useful.
>
> After a bit of digging, I found the following discussions:
> http://mail.python.org/pipermail/python-dev/2001-November/018444.html
> http://mail.python.org/pipermail/python-dev/2002-January/019392.html
> http://bugs.python.org/issue505375
>
> Another reason for accepting the patch seemed to be that it introduced
> the Py_DOCSTR() macros, which were viewed as helpful for other reasons
> (some people talked about localizing docstrings).
>
> I would point out that if 200 KB is really a big win for someone, then
> Python (and especially Python 3) is probably not the best language for
> them.
>
> It is also ironic how the executable size went up since then (from 0.6
> to more than 1.5 MB) :-)
200K can make a difference. It does on the QNX platform, for example,
where there is no virtual memory. It would be nice to reduce that
executable size, too....but I'm not volunteering to try (at least not
yet) :)
--David
More information about the Python-Dev
mailing list