Commit 8456431
committed
Perl_leave_adjust_stacks: additional efficiency for mortal copies
The existing code has a fast path for copying a SVt_NULL or SVt_IV. For all
other types, a new SVt_NULL is passed into sv_setsv_flags, where it will
be upgraded into the required type by sv_upgrade().
This commit makes two changes:
1) Special case copying a SVt_NV where possible, as sv_setsv_flags does.
2) It's safe and more efficient to directly create a new type of SVt_PVNV
or below, rather than upgrade it later, so do that.1 parent a902d92 commit 8456431
1 file changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5992 | 5992 | | |
5993 | 5993 | | |
5994 | 5994 | | |
5995 | | - | |
| 5995 | + | |
| 5996 | + | |
| 5997 | + | |
| 5998 | + | |
| 5999 | + | |
| 6000 | + | |
| 6001 | + | |
| 6002 | + | |
5996 | 6003 | | |
5997 | 6004 | | |
5998 | 6005 | | |
5999 | 6006 | | |
6000 | 6007 | | |
6001 | | - | |
6002 | | - | |
6003 | | - | |
| 6008 | + | |
| 6009 | + | |
| 6010 | + | |
6004 | 6011 | | |
6005 | 6012 | | |
6006 | 6013 | | |
| |||
6028 | 6035 | | |
6029 | 6036 | | |
6030 | 6037 | | |
| 6038 | + | |
| 6039 | + | |
| 6040 | + | |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
| 6044 | + | |
| 6045 | + | |
| 6046 | + | |
| 6047 | + | |
| 6048 | + | |
| 6049 | + | |
| 6050 | + | |
| 6051 | + | |
| 6052 | + | |
6031 | 6053 | | |
6032 | 6054 | | |
6033 | 6055 | | |
| |||
0 commit comments