[Python-Dev] _sre as part of python.dll
Duncan Booth
duncan@rcp.co.uk
Fri, 9 Aug 2002 09:52:08 +0100
On 08 Aug 2002, Guido van Rossum <guido@python.org> wrote:
>> In addition, it should decrease startup time: Python won't need to
>> locate that many files anymore.
>>
>> It also decreases the total size of the binary distribution slightly.
>
> Maybe _sre is used by most apps (though I doubt even that). But
> _socket, select, winreg, mmap and the others are definitely not. On
> Unix, all extensions are built as shared libraries, except the ones
> that are needed by setup.py to be able to build extensions; it looks
> like only posix, errno, _sre and symtable are built statically.
>
> I'd say that making more extensions static on Windows would increase
> start time of modules that don't use those extensions.
_sre is used by any application that imports 'os'. That (IMHO) is almost
every non-trivial Python program.
Of course, we shouldn't be guessing about startup times. Someone should
actually try building two versions and comparing them.
--
Duncan Booth duncan@rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?