Commit dead977
committed
pp_hot.c: shave off some CPU instructions in pp_const()
CC is MSVC 2022 x64 -O1. Before, 0x67 bytes long. After, 0x5E bytes long.
This savings obtained by not digging inside PL_op AKA my_perl->Iop->op_***
twice, and the CC not having save a C auto var around a function call.
I profiled Perl_pp_const() to be between #2 to #4 most executed pp_*()
function, per process on any workload. For extra details about this commit
see the GH PR associated with this commit.
There is an alternative I privately prototyped but I decided not to
finish 3/4s of the way which is creating pre/post arg eval variants of
function/macro rpp_xpush_1(). It was getting too invasive and complex by
lines of src code modified to finish, so that conceptual fix isn't done
here, and something best left for the future.1 parent 2d5c834 commit dead977
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| |||
0 commit comments