Message199455
I imagine that the test for ASCII is cheaper. It corresponds to the new compact internal unicode representation (one byte characters).
This looks fine. Can you quantify where the speedup comes from? Reading the code, I see we now maintain a small internal buffer in the file object, rather than using stack allocation at the call sites. It is unclear to me how this saves memory, since the amount of memory copying should be the same. Could it be that the speedup is all due to the native 8 bit support for unicode?
Have you looked at providing a special opcode for a few other magic numbers?(We have that in our own custom marshal format)
Some very common values are:
empty tuple
0
1 |
|
Date |
User |
Action |
Args |
2013-10-11 09:43:43 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, barry, pitrou, vstinner, christian.heimes |
2013-10-11 09:43:43 | kristjan.jonsson | set | messageid: <1381484623.53.0.461303636568.issue19219@psf.upfronthosting.co.za> |
2013-10-11 09:43:43 | kristjan.jonsson | link | issue19219 messages |
2013-10-11 09:43:43 | kristjan.jonsson | create | |
|