Python – IronPython performance

ironpythonnetperformance

I'm considering embedding IronPython as a scripting language for an application that I'm writing. So to try it out, I downloaded IronPython 2.0 and fired up the interactive interpreter. Just starting the thing up takes about 5 seconds on my Intel Quad Core with 6 Gigs of memory. I can hardly imagine how much of a delay this would be for a less powerful machine.

Based on these benchmarks, it seems as though IronPython's performance actually isn't too terribly bad. Or is it? Have I misconfigured something during installation? Or is this a problem with the interactive interpreter?

Best Answer

IronPython's performance is really quite good. The startup performance penalty that you get has got to do with the .NET runtime. .NET applications generally have a slow startup time because a lot of assemblies get loaded and some of them (at least some classes) get compiled on the fly.

This is expected behaviour in .NET. Actual runtime performance is much better. Even startup performance can be improved by pre-compiling the IronPython assembly and putting a copy in the GAC: global assembly cache of your machine. This can be done using the gacutil.exe.