Changes between Initial Version and Version 1 of Ticket #13394, comment 54
- Timestamp:
- 10/31/13 06:02:02 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13394, comment 54
initial v1 1 1 I have attached a !WeakValueDictionary based on your prototype, but directly implemented on `dict`. It's a drop-in replacement, so you can use it right away (and you can probably more easily test its performance). In my preliminary checks it seems (much) faster than `weakref.WeakValueDictionary` in all situations (not surprising since it's cythonized) and I think also always a bit faster than your prototype (it should be with one level of indirection less) 2 2 3 I have not made explicit modifications "safe" for dictionary iteration, although in most cases they should be fairly safe: python's dict only reshapes on ''adding'' entries, so enumerating entries shouldn't lead to huge problems (except for non-determinism).3 I have not made explicit modifications "safe" for dictionary iteration, although in most cases they should be fairly safe: python's dict only reshapes on ''adding'' entries, so mixing enumerating entries and removing them shouldn't lead to huge problems (except for non-determinism), but I think doing so is always a bug waiting to happen. 4 4 5 5 Notes I found when adapting your code: