This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1459538710.64.0.00804684630735.issue26647@psf.upfronthosting.co.za>
In-reply-to
Content
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.
https://mail.python.org/pipermail/python-ideas/2016-February/038276.html

Data+code loaded by import is the top #1 memory consumer on basic scripts according to tracemalloc:
https://docs.python.org/dev/library/tracemalloc.html#examples

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).
History
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: <1459538710.64.0.00804684630735.issue26647@psf.upfronthosting.co.za>
2016-04-01 19:25:10vstinnerlinkissue26647 messages
2016-04-01 19:25:10vstinnercreate