Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ironpython experience

0 views
Skip to first unread message

Lev

unread,
Dec 23, 2009, 3:41:46 AM12/23/09
to
I'm an on and off Python developer and use it as one of the tools.
Never for writing "full-blown" applications, but rather small, "one-of-
a-kind" utilities. This time I needed some sort of backup and
reporting utility, which is to be used by the members of our team
once or twice a day. Execution time is supposed be negligible. The
project was an ideal candidate to be implemented in Python. As
expected the whole script was about 200 lines and was ready in a 2
hours (the power of Python!).Then I downloaded Ironpython and
relatively painlessly (except the absence of zlib) converted the
Python code to Ironpython. Works fine and Ironython really is Python.
But...

The CPython 2.6 script runs 0.1 seconds, while Ironpython 2.6 runs
about 10 seconds. The difference comes from the start-up, when all
these numerous dlls/assemblies are loaded and JITed.

Is there any way to speed up the process.

Dino Viehland

unread,
Dec 23, 2009, 6:28:43 PM12/23/09
to Lev, pytho...@python.org

Can you give us more information about the environment you're running
in? E.g. how did you install IronPython, is this on 32-bit or 64-bit
and are you using ipy.exe or ipy64.exe?

The sweet spot to be in is on a 32-bit machine or a 64-bit machine
and using ipy.exe. You should also be using ngen'd (pre-compiled)
binaries which the MSI does for you. Combining 32-bit plus ngen
should greatly reduce startup time and typically on our test machines
it only takes a couple of seconds (http://ironpython.codeplex.com/wikipage?title=IP26FinalVsCPy26Perf&referringTitle=IronPython%20Performance).

That's still a lot worse than CPython startup time but it's much
better than 10 seconds. We also continue to work on startup time -
there's already some big improvements in our Main branch which should
be showing up in 2.6.1. Matching CPython is still a long ways off
if we ever can do it but do intend to keep on pushing on it.

0 new messages