pfalcon / pycopy

Pycopy - a minimalist and memory-efficient Python dialect. Good for desktop, cloud, constrained systems, microcontrollers, and just everything.
http://pycopy.readthedocs.io
MIT License
806 stars 78 forks source link

Problems with bytecode encoding #22

Open pfalcon opened 5 years ago

pfalcon commented 5 years ago
  1. Description is sparse/not clear.
  2. qstr and constant encoding per code block (== function). Instead, should be per module to allow better reuse. - .mpy ver 4 provides way to achieve that for qstr's (TBC)
  3. "code info" is mis-nomer. It has both length encoded and also ends with 0? - kinda fixed in .mpy ver 5
  4. function argname qstr's are stored in const_table and waste some space there (given that qstr's a 2-byte encoded, while entry in const_table is void*).