Maintaining Perl 5 Core (Dave Mitchell): September - October 2023
Mon, 04-Dec-2023 by
alh
edit post
Dave writes:
This is my monthly report on work done during September-October 2023
covered by my TPF perl core maintenance grant.
I mainly continued my work on making the perl stack reference counted.
In particular, I have been concentrating on "unwrapping" common ops to
reduce any slowdown on PERL_RC_STACK builds. In fact most of the last two
months has been spent on unwrapping and then optimising just a single op,
OP_AASSIGN, which performs list assignment - such as
($x, @y) = (....).
This is an exceedingly complex op due to a large number of edge cases
(such as assigning an odd number of elements to a hash), and for all the
code which tries to optimise the assignment, while avoiding premature
modification and/or freeing in code like
($a, $b) = ($b, $a);
and
@a = ($a[0], .... );
Much of this optimisation was either now redundant (the ref from the stack
will now avoid premature freeing), or needs to be done in different ways.
Hence the time spent mainly just on this one op.
Testing and benchmarking it also threw up issues in other ops which were
then also worked on.
SUMMARY:
* 65:47 make stack reference counted
* 12:41 process p5p mailbox
TOTAL:
* 78:28 TOTAL (HH::MM)
Comments (0)