Author vstinner
Recipients Demur Rumed, abarnert, benjamin.peterson, brett.cannon, georg.brandl, josh.r, ncoghlan, rhettinger, serhiy.storchaka, vstinner, yselivanov
Date 2016-04-01.19:25:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I reviewed wpy3.patch.

I concur with Raymond, it's really nice to have a regular structure for the bytecode.


Serhiy proposed to *reduce* the size of bytecode by adding new specialized bytecode which include the argument. For example (LOAD_CONST, 0) => LOAD_CONST_0. I would like to hear his opinion on this change.

Data+code loaded by import is the top #1 memory consumer on basic scripts according to tracemalloc:

I don't know the ratio between data and code. But here we are only talking about the co_code fields of code objects. I guess that the file size of .pyc is a good estimation.

I don't think that the memory footprint of bytecode (co_code fields of code objects) really matters on computers (and smartphones?) of 2016.

*If* I have to choose between CPU performance and memory footprint, I choose the CPU!


> This does _not_ include having f_lasti be -1 instead of -2

IMHO it's ok to break the C API, but I would prefer to keep the backward compatibility for the Python API (replace any negative number with -1 for the Python API).
Date User Action Args
2016-04-01 19:25:10vstinnersetrecipients: + vstinner, brett.cannon, georg.brandl, rhettinger, ncoghlan, benjamin.peterson, serhiy.storchaka, yselivanov, abarnert, josh.r, Demur Rumed
2016-04-01 19:25:10vstinnersetmessageid: <>
2016-04-01 19:25:10vstinnerlinkissue26647 messages
2016-04-01 19:25:10vstinnercreate