Closed requested to merge bitbucket/declined-pr-131 into branch/default
Created originally on Bitbucket by kostialopuhin (Konstantin Lopukhin)
Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.
As noted in https://bugs.pypy.org/issue979 pickle.dumps is much slower than pickle.dump, because of slow StringIO. It would be better to fix StringIO instead, and I will try, but for now this patch fixes pickle.dumps slowness by using StringBuilder instead. After this change pickle.dumps has the same speed as pickle.dump, I also run pickle app-level tests