Propose a str opcode with a 1-byte length

This commit is contained in:
Antoine Pitrou 2011-08-12 17:14:23 +02:00
parent bdd298f72a
commit 250db51386
1 changed files with 7 additions and 0 deletions

View File

@ -72,6 +72,13 @@ could use a binary encoding instead.
It seems that all other opcodes emitted when using protocol 3 already use
binary encoding.
Better string encoding
----------------------
Short str objects currently have their length coded as a 4-bytes integer,
which is wasteful. A specific opcode with a 1-byte length would make
many pickles smaller.
Acknowledgments