This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Olivier.Grisel
Recipients Olivier.Grisel, pitrou, serhiy.storchaka
Date 2017-11-11.15:39:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510414747.69.0.213398074469.issue31993@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-11-11 15:39:07Olivier.Griselsetrecipients: + Olivier.Grisel, pitrou, serhiy.storchaka
2017-11-11 15:39:07Olivier.Griselsetmessageid: <1510414747.69.0.213398074469.issue31993@psf.upfronthosting.co.za>
2017-11-11 15:39:07Olivier.Grisellinkissue31993 messages
2017-11-11 15:39:07Olivier.Griselcreate