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 Demur Rumed
Recipients Demur Rumed
Date 2016-03-26.23:27:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1459034868.93.0.159802163565.issue26647@psf.upfronthosting.co.za>
In-reply-to
Content
Originally started @ https://github.com/abarnert/cpython/tree/wpy

This patch is based off of https://github.com/serprex/cpython/tree/wpy

It omits importlib.h & importlib_external.h as those are generated

It omits https://github.com/serprex/cpython/blob/wpy/Python/wordcode.md

I got around to benchmarking against building on master rather than using my repo's packaged version, it's currently a 1% speed improvement (every bit counts). I'm testing on an Intel Atom 330 with Linux.  Besides the minor perf increase, it generates smaller bytecode & is simpler (peephole now handles EXTENDED_ARG since it isn't too hard to track & while loops become for loops in dis)

Previous discussion: https://mail.python.org/pipermail/python-dev/2016-February/143357.html

pdb works without changes. coverage.py doesn't seem to rely on anything this changes

I modified byteplay to target this change mostly over the course of half an hour before work: https://github.com/serprex/byteplay/blob/master/wbyteplay.py

I'd be interested to hear if this encoding simplifies things for FAT python & the recent work to cache attribute/global lookup

Remaining code issues: peepholer could allocate half the space as it does now for basic block tracking, compile.c & peephole.c repeat themselves on computing instruction size given an argument & how to spit out an instruction given an argument

Breaking change in dis: I've removed HAVE_ARGUMENT. This is to help code fail fast. It could be replaced with IGNORES_ARGUMENT or, as abarnert suggested, a range(90,256) named after the other hasXXXs 'hasarg'
History
Date User Action Args
2016-03-26 23:27:54Demur Rumedsetrecipients: + Demur Rumed
2016-03-26 23:27:48Demur Rumedsetmessageid: <1459034868.93.0.159802163565.issue26647@psf.upfronthosting.co.za>
2016-03-26 23:27:48Demur Rumedlinkissue26647 messages
2016-03-26 23:27:47Demur Rumedcreate