cython/cython — pull request #95 by scoder (2012-03-17 13:48:19+00:00)
Title: dict iteration rewrite

This is a rewrite of the dictionary iteration optimisation. It was initially motivated by the inefficiency of the ```PyDict_Next()``` implementation in PyPy's cpyext enumation layer, but turned into a much better way of doing it. Most of the work is done at C compile time and/or runtime now, which allows to apply the optimisation also optimistically to any code that tries to iterate over ```some_object.iteritems()``` etc. by falling back to normal object iteration if the input turns out not to be a dict at runtime.