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?
IronPython is slower because of DLR (dynamic language runtime) that it is built on.
As of today (22 July), IronPython 2.7. 4 for Python 2.7 is the most current stable version. Any news re Python 3 support? @RBV - github.com/IronLanguages/ironpython3 appears to be the official IronPython 3 repo.
One of the largest benefits of IronPython is that it has (effectively) no GIL - meaning that if you are both writing Python code and it is multi-threaded - you can often get performance that is better than CPython without having to spawn multiple process and pickle objects across the boundaries.
Python is Python, the only difference is that IronPython was designed to run on the CLR (. NET Framework), and as such, can inter-operate and consume . NET assemblies written in other .
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With