This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[MERGE] slim down opslot structure.
authorDavid Mitchell <davem@iabyn.com>
Mon, 5 Aug 2019 10:35:08 +0000 (11:35 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 5 Aug 2019 10:35:08 +0000 (11:35 +0100)
commit442d4b523eda1f5c8549c30d32b6539ec1c65ef9
tree7dde3587e4f413d5e23c14f96400cf1e28792623
parent45f8e7b102987a417bf55438e858cedced8aedbe
parentdae3d2d55d7ff2ff2c79e397cf2e23ecead9ddff
[MERGE] slim down opslot structure.

When OPs are allocated from a slab (the normal case), what are actually
allocated from the slab are opslot structs, which consist of an OP plus
two pointers.

The branch reduces those two pointers to two U16s, which saves 8 bytes
per op on a 64-bit system.

A further 8 bytes could be saved if those two U16s were included as
extra fields in the OP structure (and the opslot struct disposed of),
but unfortunately too much code does things like Zero(o) or Copy(o1,o2)
which would obliterate the allocation info contained in those two U16s.