Re: Faster copying of composite new-class objects

2005-12-22 Thread John J. Lee
"Alex" <[EMAIL PROTECTED]> writes: > My program requires copying thousands of composite new-class objects. I > found that the following: objCopy=cPickle.loads(cPickle.dumps(obj, > protocol=2)) works about 4 times faster than > copyObj=copy.deepcopy(obj). Is there any way to do it even faster? > >

Faster copying of composite new-class objects

2005-12-17 Thread Alex
Hi, My program requires copying thousands of composite new-class objects. I found that the following: objCopy=cPickle.loads(cPickle.dumps(obj, protocol=2)) works about 4 times faster than copyObj=copy.deepcopy(obj). Is there any way to do it even faster? All objects have slots, __getstate__ and _