[Python-Dev] SEEK_* constants in io and os
eliben at gmail.com
Fri Sep 6 16:14:11 CEST 2013
> On Mon, Sep 2, 2013 at 8:48 AM, Victor Stinner <victor.stinner at gmail.com>wrote:
>> 2013/9/2 Eli Bendersky <eliben at gmail.com>:
>> > Yes, now I see a 500 usec difference timed within the Python script.
>> > timing the whole execution of Python: (...)
>> Can you please provide the list of imported modules by:
>> python -c 'import sys; print(sys.modules)'
>> For python with default options and for python with -S (no site
>> module) options? And also with your patch?
>> Python should be fast to write "hello world" (or "python -c pass),
>> it's a dummy but common benchmark (to compare Python to other VM /
>> other programming languages).
> The sorted list for both default and -S (they're identical) is
> http://pastebin.com/4vzSMCu7 - there are 55 entries there, including
> things like itertools, heapq, functools and collections. With my patch,
> enum is also added (which makes sense since os is in the list). So the
> 0.5ms increase for the 34ms runtime kind-of makes sense.
This question is still kind-of open. I haven't received additional feedback
- only Antoine's and Victor's concerns wrt. runtime cost, which I believe I
addressed. Note that the runtime cost is globally one-time in the sense
that if additional modules (whether used at start-up or not) use enum, this
is a price only paid once.
So, is it worth it the extra 0.5ms of start-up time, or not?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev