BT

Your opinion matters! Please fill in the InfoQ Survey!

The DLR’s Adaptive Compiler

| by Jonathan Allen Follow 244 Followers on Oct 07, 2009. Estimated reading time: less than one minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

The Dynamic Language Runtime has significant performance improvements over traditional interpreters for Python and Ruby, once it is warned up. But for code you only use once or twice, it costs more to compile the expression tree than to simply interpret it.

The DLR solves this issue by introducing what they call an Adaptive Compiler. Normally the DLR will interpret expression trees instead of compiling them. If it sees a given tree is used repeatedly, then it will compile it in a background thread to be used by future calls. According to Microsoft, this is giving IronPython 2.6 a significant performance boost over earlier versions.

Because this technology is backed into the DLR, any dynamic language targeting it may opt-in for this behavior.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Benchmarks by Doug Winter

So, are there any benchmarks of this new DLR against the CPython implementation? It would be great to see if it really does deliver that much better performance.

Re: Benchmarks by Ex Raven

Here's a link that might be useful to you: CodePlex: IronPython Performance

Re: Benchmarks by Doug Winter

Very very mixed, if I am reading those results correctly.

I'd generally take benchmarks with a pinch of salt, but I have to say I think they have some more work to do on the DLR yet ;)

Re: Benchmarks by Jonathan Allen

Once they have Python 2.6 compatibility, they are shifting their focus to performance. Up until now they have been playing catch-up, but they expect to have some breathing room while Python plans their 3.2 feature set.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

4 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT