Mailing List Archive

DAVEM TPF Grant#3 September, October 2023 report
(this report covers two months)

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
------
78:28 TOTAL (HH::MM)


--
No man treats a motor car as foolishly as he treats another human being.
When the car will not go, he does not attribute its annoying behaviour to
sin, he does not say, You are a wicked motorcar, and I shall not give you
any more petrol until you go. He attempts to find out what is wrong and
set it right.
-- Bertrand Russell,
Has Religion Made Useful Contributions to Civilization?
Re: DAVEM TPF Grant#3 September, October 2023 report [ In reply to ]
On Thu, Nov 16, 2023 at 10:22?AM Dave Mitchell <davem@iabyn.com> wrote:

> (this report covers two months)
>
> 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
> ------
> 78:28 TOTAL (HH::MM)
>

Sounds fun!

Thanks Dave, +1 from me.

-- Matthew Horsfall (alh)