Message306088
Alright, I found the source of my refcounting bug. I updated the PR to include the C version of the dump for PyBytes.
I ran Serhiy's microbenchmarks on the C version and I could not detect any overhead on small bytes objects while I get a ~20x speedup (and no-memory copy) on large bytes objects as expected.
I would like to update the `write_utf8` function but I would need to find a way to wrap `const char* data` as a PyBytes instance without making a memory copy to be able to pass it to my `_Pickle_write_large_bytes`. I browsed the C-API documentation but I could not understand how to do that.
Also I would appreciate any feedback on the code style or things that could be improved in my PR. |
|
Date |
User |
Action |
Args |
2017-11-11 15:39:07 | Olivier.Grisel | set | recipients:
+ Olivier.Grisel, pitrou, serhiy.storchaka |
2017-11-11 15:39:07 | Olivier.Grisel | set | messageid: <1510414747.69.0.213398074469.issue31993@psf.upfronthosting.co.za> |
2017-11-11 15:39:07 | Olivier.Grisel | link | issue31993 messages |
2017-11-11 15:39:07 | Olivier.Grisel | create | |
|