For quick scripts that you invoke from the console, it's painful to wait a couple of seconds just to see if it does something.
For web servers, if you're using something like Google's App Engine which starts VM instances as needed, or stops them when there's no traffic, users have experienced what is called a "loading requests" ... which is basically a very slow request or requests throwing DeadlineExceededExceptions.
Ok - so you've got a script that runs in ½s, but it integrates with some .net stuff, so you run it under ironpython. Instead of getting the result straight away, you have to wait 3s (startup + run). It will be at least annoying if you rely on that script many times during the day.
It's stupid to have to wait >2 secs from pressing F5 to seeing the results of your code. Maybe not for a Java programmer, but if you're used to instant results from CPython it's annoying.
One case that comes to mind - quite often when I do unit-testing in JRuby, and run a single test from the command-line, the test will take 1sec with JRuby vs almost nothing in regular Ruby.
So I find myself running the individual test using MRI Ruby while developing, although the whole test run will be done with JRuby in the end, just because of startup time.
I use Python quite a lot before I try Scala (on JVM). I have to say the slow Scala interpreter startup (due to JVM, again) really pisses me off for scripting in Scala (otherwise it's a nice language for scripting).
Last time I tried IronPython (~ 2 months ago) it was painfully slow ... slower than Jython which is really discouraging since they've put some effort into this for quite some time now (also hiring Jim Hugunin, the lead Jython dev).
Well, it was pretty lopsided, but there were some things that IPy was pretty good at. Exceptions are much more efficient, there were some bright spots in dictionary and string manipulation.
Given that CPython is about Python, whereas IronPython is about Python and the MS environment (libraries, IIS, MSSQL, etc.), it looks like a decent alternative if you like Python, or are just tired of C#.
I think you've got that exactly backwards. IronPython is much slower than CPython at exception handling and somewhat slower with strings, but very good at, e.g., simple arithmetic operations. (Presumably the JIT turns them into reasonably nice native code.) It's somewhat faster than CPython on PyStone and quite a lot slower on the Richards benchmark. It takes substantially longer to run the whole PyBench suite than CPython, but that's entirely accounted for by its rotten performance with exceptions.
I remember when FePy was first coming out, and Jim Hugunin was encountering considerable slowness in regard to exceptions, and he conferred with Guido about it because the fail-first idiom is a preferred python strategy. Anyways, Guido was like, you are functionally equivalent so it doesn't matter. (I'm just regurgitating my rough memory of Jim's blog about it.) But that was also the first time I learned how disruptive an exception was to .Net program flow. I've also seen it in general with other .Net languages -- exceptions kill performance, and defensive programming is very worth the extra effort.
At the day job, they run an all-MS-windows environment. So i use IronPython to write administration scripts for the database and to do some calculation or migrate datasets or things like that.
It is definitely slow, but I am willing to deal with that because Python as a language shines with such tasks.(or any dynamic language I guess)
18 comments
[ 5.1 ms ] story [ 56.0 ms ] threadFor quick scripts that you invoke from the console, it's painful to wait a couple of seconds just to see if it does something.
For web servers, if you're using something like Google's App Engine which starts VM instances as needed, or stops them when there's no traffic, users have experienced what is called a "loading requests" ... which is basically a very slow request or requests throwing DeadlineExceededExceptions.
That's because the startup time of the runtime is very slow, especially when you have big dependencies like JRuby ... see this blog post for instance ... http://googleappengine.blogspot.com/2009/12/request-performa...
So I find myself running the individual test using MRI Ruby while developing, although the whole test run will be done with JRuby in the end, just because of startup time.
http://groups.google.com/group/clojure/browse_frm/thread/33f...
http://stackoverflow.com/questions/1316056/how-to-reduce-sca...
http://www.assembla.com/spaces/clojure/tickets/81-GC--Issue-...
http://groups.google.com/group/clojure/browse_thread/thread/...
Given that CPython is about Python, whereas IronPython is about Python and the MS environment (libraries, IIS, MSSQL, etc.), it looks like a decent alternative if you like Python, or are just tired of C#.
It is definitely slow, but I am willing to deal with that because Python as a language shines with such tasks.(or any dynamic language I guess)