Message187918
| Author |
serhiy.storchaka |
| Recipients |
Arfrever, alexandre.vassalotti, asvetlov, neologix, pitrou, rhettinger, serhiy.storchaka |
| Date |
2013年04月27日.17:44:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1367084674.33.0.77841470641.issue17810@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> Padding makes it both less efficient and more annoying to handle, IMO.
Agree. But there is other application for NOPs. UTF-8 decoder (and some other decoders) works more fast (up to 4x) when input is aligned. By adding several NOPs before BINUNICODE so that start of encoded data is 4- or 8-bytes aligned relatively to start of frame, we can significan speedup unpickling long ASCII strings. I propose to add new NOP opcode and to use it to align some align-sensitive data.
> My framing proof-of-concept ends up quite simple in terms of code
> complexity. For example, the C version only adds 125 lines of code in 3
> additional functions.
I just looked in the code and saw that the unpickler already has a ready infrastructure for prefetching. Now your words have not appear to be so incredible. ;) It should work.
> No doublecopying is necessary (not in the C version, that is).
Agree, there is no doublecopying (except for large bytes objects). |
|