Python startup time (was: Brainstorming for UDS-P)

Christopher James Halse Rogers raof at ubuntu.com
Thu Sep 29 01:40:45 UTC 2011


On Tue, 2011-09-27 at 01:08 +0200, Benjamin Drung wrote:
> Am Montag, den 26.09.2011, 13:48 +0200 schrieb Sebastien Bacher:
> > Le vendredi 23 septembre 2011 à 21:56 +0100, Allison Randal a écrit :
> > > Hi all,
> > > 
> > > While we're all in the final preparations for Oneiric, it's round about
> > > that time in the cycle to start thinking about plans for the next cycle.
> > > What's on your mind?
> > 
> > Some desktopish suggestions:
> > 
> > - Boot and desktop performances (boot time, memory usage, power
> > consumption)
> 
> Moving applications from Python 2 to Python 3 will increase the startup
> time. I wrote a little script that runs n times hello world programs and
> takes the time. That reveals a startup time increase of factor two
> between Python 2 and 3. Running the hello world programs 100 times on my
> system with an Core i5 takes following time (in seconds):
> 
> C:       0.04
> D:       0.14
> Haskell: 0.22
> Bash:    0.23
> CShell:  0.25
> Perl:    0.27
> PHP:     0.81
> Python:  1.54
> Python3: 3.22
> Ruby:    0.28
> Shell:   0.10
> ZShell:  0.22
> C#:      2.55

If we cared sufficiently about C# startup time, I suspect we could cut
this significantly by doing AOT compilation on install, same as we
byte-compile python.

Perhaps I should try some benchmarking…
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20110929/8019b094/attachment.pgp>


More information about the Ubuntu-devel-discuss mailing list