Message187918
> 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). |
|
| Date |
User |
Action |
Args |
| 2013-04-27 17:44:34 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, pitrou, alexandre.vassalotti, Arfrever, asvetlov, neologix |
| 2013-04-27 17:44:34 | serhiy.storchaka | set | messageid: <[email protected]> |
| 2013-04-27 17:44:34 | serhiy.storchaka | link | issue17810 messages |
| 2013-04-27 17:44:33 | serhiy.storchaka | create | |
|