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 mpb
Recipients mpb, pitrou
Date 2013-11-14.06:27:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384410428.12.0.766944701547.issue19577@psf.upfronthosting.co.za>
In-reply-to
Content
It would be nice in terms of avoiding malloc()s and free()s.

I could estimate it in terms of memoryview creations per message parse.  I'll be creating 10-20 memoryviews to parse each ~100 byte message.

So... I guess I'd have to build a test to see how long a memoryview creation/free takes.  And then perhaps compare it with variable to variable assignment instead.

If Python pools and recycles unused object by type (the way Lisp recycles cons cells) without free()ing them back to the heap, then there would be minimal speed improvement from my suggestion.  I don't know how CPython works internally, however.
History
Date User Action Args
2013-11-14 06:27:08mpbsetrecipients: + mpb, pitrou
2013-11-14 06:27:08mpbsetmessageid: <1384410428.12.0.766944701547.issue19577@psf.upfronthosting.co.za>
2013-11-14 06:27:08mpblinkissue19577 messages
2013-11-14 06:27:07mpbcreate