copy-on-write for dict objects?
Michael Hudson
mwh at python.net
Wed Jan 15 14:01:50 EST 2003
Matthias Oberlaender <matthias.oberlaender at REMOVE.daimlerchrysler.com> writes:
> Is there an easy way in Python 2.2.1 to add a copy-on-write mechanism to
> subclasses of dict, i.e. without extending/modifying the C-code
> implementation? (I guess there is none!)
Not sure what you mean. But I doubt it. You need a level of
indirection in there, so I don't see how you could do it directly even
hacking C.
> I don't want to resort to UserDict again, since, at least for my
> purposes, it's much slower than direct subclasses of dict (around
> 10x)
I know that feeling.
Cheers,
M.
--
"Well, the old ones go Mmmmmbbbbzzzzttteeeeeep as they start up and
the new ones go whupwhupwhupwhooopwhooooopwhooooooommmmmmmmmm."
-- Graham Reed explains subway engines on asr
More information about the Python-list
mailing list