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 methane
Recipients Guido.van.Rossum, Mark.Shannon, gvanrossum, iritkatriel, methane, rhettinger, serhiy.storchaka, terry.reedy
Date 2021-10-02.07:54:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633161260.87.0.763440196897.issue36521@roundup.psfhosted.org>
In-reply-to
Content
> For the sqlalchemy example: the saving in co_consts is about 1.6k (200 pointers), but an increase in bytecode size of 2.4k.

Please see number of co_constatns tuples. (d) saved 1307 tuples compared to (b).
`sys.getsizeof(())` is 40 on 64bit machine. So 1307 tuples is 50k bytes. This not saves only memory usage, but also import time too.

Although bytecode size is increased, they are released soon right after importing module because `LOAD_CONST` is in module or class code.

So there is a significant gain overall.

> It’s not clear that LOAD_NONE/LOAD_COMMON_CONST are worth doing. Any way the docstring question is not necessarily related to that.

I combined with LOAD_NONE because this issue and LOAD_NONE/LOAD_COMMON_CONST has synergy.

But I don't combine it in next time.
History
Date User Action Args
2021-10-02 07:54:20methanesetrecipients: + methane, gvanrossum, rhettinger, terry.reedy, Mark.Shannon, serhiy.storchaka, Guido.van.Rossum, iritkatriel
2021-10-02 07:54:20methanesetmessageid: <1633161260.87.0.763440196897.issue36521@roundup.psfhosted.org>
2021-10-02 07:54:20methanelinkissue36521 messages
2021-10-02 07:54:20methanecreate