Message198440
Could you please add unit tests for check that ob_start is used instead of memmove()?
I didn't find a function for that in _testcapi. I tried to test it using sys.getsizeof(), but the size is not reliable (the bytearray buffer is not always shrinked, it depends on the new size).
The best is probably to add a new function in _testcapi to get private attributes: ob_exports, ob_alloc, ob_start, ob_bytes. Using these attributes, it becomes easy to check that fast-path are correctly optimized (eg. increases ob_start instead of getting a new ob_bytes buffer). |
|
Date |
User |
Action |
Args |
2013-09-26 12:33:57 | vstinner | set | recipients:
+ vstinner, pitrou, serhiy.storchaka |
2013-09-26 12:33:57 | vstinner | set | messageid: <1380198837.04.0.697765650691.issue19087@psf.upfronthosting.co.za> |
2013-09-26 12:33:57 | vstinner | link | issue19087 messages |
2013-09-26 12:33:56 | vstinner | create | |
|