develooper Front page | perl.perl5.changes | Postings from August 2022

[Perl/perl5] e033b0: sv.c - add Perl_newSVhek_mortal

From:
Richard Leach via perl5-changes
Date:
August 5, 2022 20:44
Subject:
[Perl/perl5] e033b0: sv.c - add Perl_newSVhek_mortal
Message ID:
Perl/perl5/push/refs/heads/blead/819d09-518db9@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: e033b0b9c2bf27f70f0267fc75188d4e7d2fc863
      https://github.com/Perl/perl5/commit/e033b0b9c2bf27f70f0267fc75188d4e7d2fc863
  Author: Richard Leach <richardleach@users.noreply.github.com>
  Date:   2022-08-05 (Fri, 05 Aug 2022)

  Changed paths:
    M embed.fnc
    M embed.h
    M proto.h
    M sv.c

  Log Message:
  -----------
  sv.c - add Perl_newSVhek_mortal

This is a small wrapper function intended to replace use of
    sv_2mortal(newSVhek(...))

This provides some small optimization, since sv_2mortal performs
a number of checks for conditions that we know cannot be true.


  Commit: 518db96ae536faa5656a7cdc6b3dc510b75edb79
      https://github.com/Perl/perl5/commit/518db96ae536faa5656a7cdc6b3dc510b75edb79
  Author: Richard Leach <richardleach@users.noreply.github.com>
  Date:   2022-08-05 (Fri, 05 Aug 2022)

  Changed paths:
    M gv.c
    M hv.c
    M mro_core.c
    M op.c
    M pp.c
    M pp_sys.c
    M sv.c
    M toke.c
    M util.c

  Log Message:
  -----------
  Replace sv_2mortal(newSVhek( with newSVhek_mortal

The new Perl_newSVhek_mortal function is slightly more efficient.


Compare: https://github.com/Perl/perl5/compare/819d09b57c6a...518db96ae536



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About