Pyhon 2.x or 3.x, which is faster?

Steven D'Aprano steve at pearwood.info
Tue Mar 8 18:59:27 EST 2016


On Wed, 9 Mar 2016 06:15 am, BartC wrote:

[...]
> But this was hardly necessary as it was so obvious: it takes 150ms to
> process a 300-pixel image, 20 seconds for a 2Mpixel one, and (I have to
> switch to PyPy here as I've never had time to hang about for it) 180
> seconds for 80Mpixel file.
> 
> Surely the start-up time would be the same no matter what the input.


I've been trying to follow this thread, but I'm completely lost as to why
we're discussing startup time. Mark seems to think that it's completely
irrelevant, but that's surely wrong. Startup time might be irrelevant for
long-running processes (say, a tool that runs for minutes or hours
processing millions of files, or a server that is expected to stay running
for weeks at a time) but it has a very large effect on the performance of
quick-running command line tools.

For what it's worth, the core developers are aware that CPython's startup
time has been increasing, and that it is large enough to impact the feeling
of snappiness and responsiveness for command line tools. They are actively
working on this to keep it as low as possible.

 

-- 
Steven




More information about the Python-list mailing list