Antoon Pardon wrote:
I have the impression you are looking at this too much from the view
of the current implementation where putting a an entry in
a directory is seen as an atomic operation.

Yes and no. I *am* looking at it from an implementation point of view, but dictionaries have nothing to do with the relevant part of the implementation.


The CPython *_FAST opcodes relate to functions' local variables. Behind the scenes they are implemented as integer indexing operations into a pre-sized C array. Operations don't come much faster than that :)

Could a rebinding operation *theoretically* be quicker for the other cases which involve a real dictionary (or something that looks like one)? Well, perhaps. Although I can't see how the rebinding operation would gain a benefit that a standard binding operation wouldn't gain if placed at the exact same point.

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to