Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: da2d8d051bc3afdfa7c968e22cb6bbee697f36e5
      
https://github.com/Perl/perl5/commit/da2d8d051bc3afdfa7c968e22cb6bbee697f36e5
  Author: David Mitchell <da...@iabyn.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M pp.c
    M pp_ctl.c
    M pp_hot.c
    M pp_sys.c

  Log Message:
  -----------
  make RC-stack-aware: unwrap nullary pp() fns

Remove the temporary wrappers from most of the pp() functions which
take zero arguments from the stack (but which may well return
arguments).

Only the simple nullary OPs have been unwrapped in this commit; more
complex ones will have their own commit.


  Commit: c1771c7a7fd86bac2159e1d65c8037dd70228099
      
https://github.com/Perl/perl5/commit/c1771c7a7fd86bac2159e1d65c8037dd70228099
  Author: David Mitchell <da...@iabyn.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M doop.c
    M embed.fnc
    M hv.c
    M pp.c
    M pp_hot.c
    M proto.h

  Log Message:
  -----------
  make RC-stack-aware: unwrap rv2av etc pp fns

Remove the temporary wrappers from a set of pp() functions which
handle retrieving the whole contents of an array or hash. These needed
to be done as one commit because there's a lot of shared static
functions etc that all need to be changed at the same time.

The unwrapped pp() functions are:

    do_kv        (a.k.a. pp_keys, pp_values)
    pp_rv2sv
    pp_padrange
    pp_padav
    pp_padhv
    pp_rv2av     (a.k.a. pp_rv2hv)
    pp_lvavref

In addition the following static or non-public functions were fixed and
changed:

    Perl_hv_pushkv
    S_padhv_rv2hv_common  - it's now responsible for popping arg
    Perl_softref2xv       - its signature has changed.


  Commit: a71e78fa8d19d16a867e214b1c331a4922fe7bda
      
https://github.com/Perl/perl5/commit/a71e78fa8d19d16a867e214b1c331a4922fe7bda
  Author: David Mitchell <da...@iabyn.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M pp.c
    M pp_hot.c

  Log Message:
  -----------
  make RC-stack-aware: unwrap unary pp() fns

Remove the temporary wrappers from many of the pp() functions which
take a single argument from the stack.

Only the simple unary OPs have been unwrapped in this commit; more
complex ones will come later.


  Commit: a5773895bac3a078fc5f832bde2b9c7abc5bfb03
      
https://github.com/Perl/perl5/commit/a5773895bac3a078fc5f832bde2b9c7abc5bfb03
  Author: David Mitchell <da...@iabyn.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M builtin.c
    M pp.c

  Log Message:
  -----------
  make RC-stack-aware: unwrap builtin pp() fns

Remove the temporary wrappers from the pp() functions which
implement some of the functionality of the builtin:: namespace.

All of these had to be done as a single commit, because a couple
of XS functions which implement many of the builtin subs need to be made
RC-stack-aware at the same time as all the associated pp() functions,
since those pp() functions are tail-called by the XS functions.


  Commit: cee987b6dcd3c1ff1e5b6247f0ae50e8f5a3ae54
      
https://github.com/Perl/perl5/commit/cee987b6dcd3c1ff1e5b6247f0ae50e8f5a3ae54
  Author: David Mitchell <da...@iabyn.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M pp.c
    M pp_ctl.c
    M pp_hot.c

  Log Message:
  -----------
  make RC-stack-aware: unwrap binary pp() fns

Remove the temporary wrappers from many of the pp() functions which
take two arguments from the stack.

Only the simpler binary OPs have been unwrapped in this commit; more
complex ones will come later.


  Commit: 27b89dfb1aff866a35ee442e225fe6c97631acbf
      
https://github.com/Perl/perl5/commit/27b89dfb1aff866a35ee442e225fe6c97631acbf
  Author: David Mitchell <da...@iabyn.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M builtin.c
    M doop.c
    M embed.fnc
    M hv.c
    M pp.c
    M pp_ctl.c
    M pp_hot.c
    M pp_sys.c
    M proto.h

  Log Message:
  -----------
  [MERGE] make most null/un/binary pp() fns RC-ware

This series of commits "unwraps" most of the common nullary, unary and
binary pp() functions so that, under PERL_RC_STACK builds, the pp()
functions run directly rather than being called via a slow wrapper.

I've gone for the low-hanging fruit, which gives the greatest speed-up
from the least effort, so far. I've generally avoided functions in
pp_sys.c - they are typically complex in terms of ifdefs to run on
different platforms, and the I/O they trigger make the slowdown from the
wrapper less noticeable.

I've skipped pp_eq, pp_i_eq, pp_seq and pp_match for now as they have a
dependency on the smartmatch op.

I haven't looked at list ops yet.

On non-PERL_RC_STACK builds, there should be no noticeable change in
behaviour or performance.


Compare: https://github.com/Perl/perl5/compare/e78b109c9815...27b89dfb1aff

Reply via email to