Message98501
I am attaching a new patch that does not add a new element to PyListObject, roughly following a technique that Antoine Pitrou suggested on python-dev. When I want to lazily avoid a memmove under the new patch, I set the MSB on allocated and store the original ob_item pointer in the new ob_item[-1].
On the advice of Daniel, I ran the new patch against the Unladen benchmark suite. The results were pretty neutral--never more than a 1% penalty but no significant gains either. I did not expect to see gains, for the obvious reason that I am improving performance on an operation that folks have been encouraged to work around. The new patch continues to do well on microbenchmarks.
The new patch fails one test in test_sys related to the 12 byte garbage collection header. The failure is definitely introduced by my patch, but I am not sure what it's doing wrong. All other tests pass.
Because the new code piggybacks on top of of allocated instead of creating a new variable in PyListObject, the new code is a bit more complex than the original patch, which is unfortunate. There are probably some opportunities for making the new code simpler. |
|
Date |
User |
Action |
Args |
2010-01-29 10:05:06 | Steve Howell | set | recipients:
+ Steve Howell, rhettinger, Rhamphoryncus, stutzbach, flox |
2010-01-29 10:05:05 | Steve Howell | set | messageid: <1264759505.77.0.991738748905.issue7784@psf.upfronthosting.co.za> |
2010-01-29 10:05:04 | Steve Howell | link | issue7784 messages |
2010-01-29 10:05:02 | Steve Howell | create | |
|