[IronPython] IronPython Start-up Time
dinov at exchange.microsoft.com
Tue Jul 17 18:21:18 CEST 2007
It's a great time to bring this up because I'm currently investigating various start-up time issues and trying to improve our startup time. I'll give you a breakdown of what I've discovered so far:
Various reflection that we do over types:
This includes over modules (SystemState, built-ins, re, etc...)
Over types for creating "DynamicType"s: object, string, PythonFile, etc... - these are the types we need to startup and display the logo.
Not on hello world, but on a more complex scenario, I know we JIT 2500 methods on startup on the desktop CLR (this is loading the Python version of the chess API shown at MIX - but not actually running it). Obviously that's going to take some time too. W/o an ngen's mscorlib we'll JIT something like 4000 methods.
There's also some little things here and there but my numbers show JITing is representing around 70% of our startup time. Being as fast as CPython might be tough but we certainly want to do better than where we are.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of C L
Sent: Tuesday, July 17, 2007 2:10 AM
To: users at lists.ironpython.com
Subject: [IronPython] IronPython Start-up Time
playing around a bit with IronPython I noticed that the start-up time is
Something around ~12s for the initial launch and around ~3,5s for each following
with IronPython-2.0A2\ipy.exe (on a Core Duo 2Ghz 2GB)
I am not complaining, just curious.
Is this simply because loading the CLR/DLR takes so much time?
And what is with the 3.5s for successive start-ups?
For comparison CPython needs ~2s for the initial and
~0.2s for successive start-ups.
Btw I used the simple C++ program
// Compile with
// cl /Feuxtime.exe /EHsc uxtime.cpp
// uxtime.exe "PATH_TO_IronPython\ipy.exe simplyExit.py"
#include <stdlib.h >
int main( int argc, char**argv)
int c_start = clock();
int c_end = clock();
printf("%d\n", ((double)(c_end - c_start)) / CLOCKS_PER_SEC );
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users