DLR
Sep 19 2009
Dynamic Language Runtime Performance Demos
I spoke at the Charlottesville .NET User Group this week and at the Raleigh Code Camp. I cheated and did the same presentation to both groups. Call me lazy but, in the middle of planning our own Code Camp in Richmond, I really didn't want to prepare two separate talks. I did a talk back at CodeStock 2009 on a similar topic back in June 2009 but it's evolved a lot since then based on my own growth and understanding. You can find the code and slides below.
Jun 27 2009
How I Learned to Love Metaprogramming
UPDATED on 30 June 2009
I spoke at the CodeStock 2009 conference and I thought it would be helpful for the attendees and others to be able to download my code and slides. The title of my presentation was "How I Learned to Love Metaprogramming" and it concerns Dynamic Language Runtime architecture, performance of dynamic typing and Python to C# integration. The slides and source code are linked below. I will be giving this talk again in September at the Charlottesville .NET User Group meeting. Both of the demos require C# 4.0 which is available in Visual Studio 2010.
- Demo One - shows how to do XML parsing using a fluent interface based on a DynamicObject derivation in C# 4.0
- Demo Two - shows how the Level 0, 1 and 2 CallSite and ActionBinder caches perform. UPDATED: I added a demo on 30 June 2009 that shows how the DLR 0.9 compares by invoking dynamic code through the DLR hosting APIs, thereby bypassing the CallSite caching mechanisms. The results are very instructive, showing that the DLR's polymorphic inline caching can yield a 250000% increase in performance. You read that correctly: a two hundrend fifty thousand percent increase in performance.
Slides in PDF (Acrobat) format (688.49 kb)
Slides in PPTX (PowerPoint 2007) format (639.23 kb)
Demo One Source Code - MetaObjectPlay200905.zip (5.17 kb)
Demo Two Source Code - PythonIntegration200906.zip (5.33 kb)