We've spent a little bit of time looking at generating optimized code (with 
guards + inlined operations) but it hasn't yet yielded any benefits over our 
current polymorphic inlining caching strategy.  But that's probably just 
because we haven't pushed on it hard enough.

I've also looked at specializing loops over range/xrange as well - that yielded 
a huge (8x if I recall correctly) benefit in simple for loop performance.  
That's probably comparable to the benefit IronJS say between the old/new 
versions in your link.  But w/o specializing the code in the loop body it 
didn't seem to be worth the extra complication yet.  I plan to resurrect that 
work at some point.

Static analysis might be interesting but I have my doubts of how well it'll 
work for Python.  I think the best direction to go is the runtime type feedback 
route + guards instead.  The problem here is that it's so easy to invalidate 
the static analysis that we'll need guards anyway.

As far as V8 levels I'm not sure - Python sure does seem to be a lot more 
dynamic than JavaScript is but we certainly do want to continue to push on 
performance.  I wouldn't want to commit to any specific goal yet :)

From: [email protected] 
[mailto:[email protected]] On Behalf Of Luis M. Gonzalez
Sent: Wednesday, February 24, 2010 1:51 PM
To: Discussion of IronPython
Subject: [IronPython] IronJs optimizations. Can this be done in IronPython?

Hi there,

I've been reading a fascinating blog post about IronJs, a new javascript 
implementation based on the DLR, and I'm excited to read that two optimization 
features of this implementation have resulted in speed ups comparable to those 
of Chrome's V8 and Firefox's Tracemonkey.

This is the link:
http://ugh.cc/ironjs-preview-benchmarks-of-the-new-compiler/

These features are:

  *   Static analysis of variables to determine as many types as possible at 
compile-time
  *   Per-function type-specializing runtime compilation

The author warns that "this is a very very early and limited benchmark. This 
just test a small part of the runtime.", however, this looks promising since 
the language is being implemented on top of the DLR.
I wonder if these techniques can be implemented in Ironpython, or if anything 
along these lines is already being implemented.
Is there any chance to speedup Ironpython to V8's levels?

Luis
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to