472,992 Members | 3,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

IronPython faster than CPython?

I learned a lot from the other thread 'Is a "real" C-Python possible?' about
Python performance and optimization. I'm almost convinced that Python's
performance is pretty good for this dynamic language although there are
areas to improve, until I read some articles that say IronPython is a few
times faster. I find it amazing that something that's written in C and runs
on hardware is slower than a .NET app that runs on CLR as managed code:

http://www.python.org/~jeremy/weblog/031209a.html
http://blogs.msdn.com/jasonmatusow/a...28/402940.aspx
Dec 18 '07 #1
3 2315
On Dec 19, 9:18 am, "Jack" <nos...@invalid.comwrote:
I learned a lot from the other thread 'Is a "real" C-Python possible?' about
Python performance and optimization. I'm almost convinced that Python's
performance is pretty good for this dynamic language although there are
areas to improve, until I read some articles that say IronPython is a few
times faster. I find it amazing that something that's written in C and runs
on hardware is slower than a .NET app that runs on CLR as managed code:

http://www.python.org/~jeremy/weblog/031209a.html
Four years old. IP 0.1 vs CP 2.3. Sheesh.
http://blogs.msdn.com/jasonmatusow/a...28/402940.aspx
Close to 3 years old but somewhat more meaningful ...

"""IronPython 0.7 is up to 1.8x faster than Python-2.4 on the standard
pystone benchmark. The key to IronPython's performance is that it
compiles Python code to .NET Intermediary Language which is then
translated to optimized machine code by the runtime."""

Where did you get "a few times faster" from?
Dec 18 '07 #2
In article <AK******************************@comcast.com>,
"Jack" <no****@invalid.comwrote:
I learned a lot from the other thread 'Is a "real" C-Python possible?' about
Python performance and optimization. I'm almost convinced that Python's
performance is pretty good for this dynamic language although there are
areas to improve, until I read some articles that say IronPython is a few
times faster. I find it amazing that something that's written in C and runs
on hardware is slower than a .NET app that runs on CLR as managed code:

http://www.python.org/~jeremy/weblog/031209a.html
http://blogs.msdn.com/jasonmatusow/a...28/402940.aspx
You might argue that Python programs executed using CPython "run on
hardware" to a *lesser* extent than they do when run in IronPython. In
either case, your program is parsed and compiled into bytecode (Python
bytecode or MSIL), then loaded by the Python virtual machine or the .NET
VM, respectively. But whereas the Python VM is a bytecode interpreter,
the .NET VM, like Java, uses just-in-time compilation to translate MSIL
bytecode to optimized machine code for more efficient execution. This
is probably the most important factor in the performance difference
demonstrated in the above links.

The fact that the IronPython compiler is written in C# and therefore
runs from the VM, whereas the CPython compiler is compiled straight to
machine code, is unimportant. Even if a significant performance
difference did result from this, keep in mind that the bulk of the
execution time of any Python app worth profiling is going to be after
this initial Python-to-bytecode compilation, during the execution of the
program's bytecode itself.

--
Mark Shroyer
http://markshroyer.com/contact/
Dec 18 '07 #3
Jack <no****@invalid.comwrote:
>I learned a lot from the other thread 'Is a "real" C-Python possible?' about
Python performance and optimization. I'm almost convinced that Python's
performance is pretty good for this dynamic language although there are
areas to improve, until I read some articles that say IronPython is a few
times faster.
In my limitted experience, IronPython is slower than CPython. I can't
actually get much to run with IronPython, but what I have been able
to get working runs slower. In particular initialization time takes
much longer. A command line utility of mine that takes 1.5 seconds to
run with CPython, ends up taking 20 seconds with IronPython. That 3
seconds for IronPython's own startup and initilization, 12 seconds for
importing modules, and 5 seconds for the rest.

Ross Ridge

--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rr****@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
Dec 20 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ajay | last post by:
hi! Is it possible for me to have part of my application written using C#.NET and then have it called from within a Python program. thanks cheers
8
by: John Salerno | last post by:
Hi all. I'm currently learning C#, and I'm also interested in learning Python (all of this just for fun, mind you), so it seems like a decent idea to want to integrate the two. But I don't quite...
3
by: Carl Johan Rehn | last post by:
What is the difference between CPython, Python for .NET, and IronPython? For example, if I'm running IronPython, can I access modules such as Numeric and numarray? As I understand it,...
3
by: Sanghyeon Seo | last post by:
I took some time to write this HOWTO: http://sparcs.kaist.ac.kr/~tinuviel/fepy/howto/simplehttpserver-ironpython-mono-howto.html IronPython seems to get much less interest than it deserves. This...
9
by: Luis M. González | last post by:
Check it out: http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742
2
by: tkpmep | last post by:
I'm looking forward to the release IronPython, primarily for its IDE. I currently use scipy and pyExcelerator to crunch numbers and write them to Excel: does can these packages be used with...
9
by: Claudio Grondi | last post by:
(just wanted to share my experience with IronPython 1.0) The context: C:\IronPythonipy.exe IronPython 1.0.60816 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved....
22
by: dmitrey | last post by:
Hi all, the url http://torquedev.blogspot.com/2008/02/changes-in-air.html (blog of a game developers) says IronPython is faster than CPython in 1.6 times. Is it really true? If yes, what are...
1
by: jmDesktop | last post by:
I know that IronPython and CPython are different in that one does not use the .net framework, but are they both really the same Python language. From my basic understanding, it will depend on what...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.