[IronPython] IronPython 2.6 CodePlex Source Update

merllab at microsoft.com merllab at microsoft.com
Tue Dec 15 17:52:27 CET 2009

This is an automated email letting you know that sources 
have recently been pushed out.  You can download these newer 
sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/62295.




Changeset Id: 1345559
Date: 12/14/2009 5:56:03 PM

For old-style classes we have had an optimized dictionary which performs lock-free array based storage for instance members which are assigned in __init__.  This adds the same optimization for (most) new-style classes.  

The class CustomOldClassDictionaryStorage is renamed to CustomInstanceDictionaryStorage to indicate that this is now shared between both new-style and old-style classes.  The names version allocation moves as a static on CIDS.  When creating a new-style class which doesn’t have a meta-class we now flow the self names that we’ve always calculated in the type.  When initializing the type we walk the MRO and collect all of the names that are base classes want as well.  We then remember the list of names if we have any.

Then when we go and create the dictionary for a new-style class we create a dictionary backed by CIDS instead of our CommonDictionaryStorage.  Finally both are pre-compiled and non-precompiled code paths are updated to generate rules which access the correct array index instead of doing a dictionary lookup.

On my machine this brings Richards.py, a bench mark which does lots of instance dictionary access, execution time down to 4.68s from 7.84s for a 38% improvement.

I’m also deleting DynamicRuntimeHostingProvider from Microsoft.Dynamic – this type was duplicated in both Microsoft.Scripting and Microsoft.Dynamic but only the one in Microsoft.Scripting is useful.

(Shelveset: OptimizedNewStyleClassesFinal;REDMOND\dinov | SNAP CheckinId: 10016)

More information about the Ironpython-users mailing list