[IronPython] PyPy and GenCLI
Michael Foord
fuzzyman at voidspace.org.uk
Sun Mar 18 23:55:07 CET 2007
Hello all,
I've read the PyPy EU report on the CLI backend. Most of it is
experimental and interesting, but hard to see how it is directly
immediately useful.
If I understand the GenCLI backend correctly though, it may be of
interest to this list.
IIUC, GenCLI takes RPython code and compiles to IL - with native .NET
classes for classes defined in RPython.
In PyPy, this is used to translate PyPy itself to provide a Python
interpreter on top of .NET (unlike IronPython which is a compiler).
(RPython is a static subset of Python - all RPython code is valid Python
code, but not vice-versa.)
If I'm right, then RPython could be used to compile native .NET
assemblies, which of course could be used from IronPython. This may be a
preferable optimisation route than dropping down into C# where extra
speed is needed.
When benchmarking performance of GenCLI (and PyPy), this is the figures
they came up with for an implementation of the classical Martin
Richards’s benchmark :
Implementation Result
richards-c# 7.093
richards-gencli 13.312
CPython richards.py 1139.632
IronPython richards.py 1751.246
pypy-cli richards.py (built-in) 5952.501
pypy-cli richards.py 12010.541
As you can see, gen-cli code is not much slower than C#.
All the best,
Michael Foord
http://www.voidspace.org.uk/ironpython/
More information about the Ironpython-users
mailing list