Startup Time for IronPython 2.6.1 for .NET 4.0 is 30% Faster
Where exactly is this improvement coming from? Well we don't know quite yet. Our first bona fide .NET 2.0 SP1 versus .NET 4.0
IronPython perf suite run occurred less than two weeks ago! An educated guess is that at least
a small portion of this improvement stems from the fact that Microsoft.Scripting.Core.dll
is actually part of the .NET 4.0 framework. Any ways, you can see more of the performance characteristics of IronPython running under both these .NET releases here
Beautiful is better than Ugly and Simple is Better than Complex
The screenshot above shows a small C# snippet of code utilizing a Python module both as a .NET 3.5 application (top) and as a .NET 4.0 application (bottom). Both of these snippets have been diffed to highlight differences in red.
It should be blindingly obvious that the bottom snippet is far more readable due to the use of C# 4.0’s new dynamic
type. What the hell’s an “IDynamicMetaObjectProvider” supposed to be any ways? In any event, our DLR and IronPython hosting APIs are adhering more to the Zen of Python
with each release.
Python and Ruby Play Nice Together
In the Command Prompt
session above, I’ve created a trivial Ruby class, RubyPC
, which provides a factorial method, fact
, in rbfactorial.rb
. From there, I started an IronPython interactive session and directly called into the rbfactorial
Ruby script via our clr
builtin Python module. Let’s see you do that from other implementations of Python:-)
IronPython 2.6.1 for .NET 4.0 and IronRuby 1.0v4 are the first two major releases of these dynamic languages that share the same Dynamic Language Runtime pedigree. The end result of this is that they interop together quite nicely out of the box with one small caveat: you just need to copy “IronPython-2.6.1-Src\IronPython-2.6.1\Config\Signed\App.config
” from the source or binary zip file releases to “%ProgramFiles%\IronPython 2.6 for .NET 4.0\ipy.exe.config
” and/or “%ProgramFiles%\IronPython 2.6 for .NET 4.0\ipy64.exe.config
”. This configuration file tells IronPython which version of IronRuby it needs to load, and we simply forgot to include this file in the IronPython MSI installer.