This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_tms should use a local struct tms, instead of PL_timesbuf.
authorNicholas Clark <nick@ccl4.org>
Sat, 1 Mar 2014 16:40:05 +0000 (17:40 +0100)
committerNicholas Clark <nick@ccl4.org>
Sat, 1 Mar 2014 16:40:05 +0000 (17:40 +0100)
commit25983af42cdcf2dc1fea6717dac7aac441b6301d
tree0a6de9811bcfe84d9a22b8a1cdf53f2fdba55834
parentc79d007613fa174f6f5e1588ca5374f505fc44af
pp_tms should use a local struct tms, instead of PL_timesbuf.

PL_timesbuf is effectively a vestige of Perl 1, and doesn't actually need to
be an interpreter variable. It will be removed early in v5.21.x, but it's a
good idea to refactor the code not to use it before then. A local struct tms
will be on the C stack, which will be in the CPU's L1 cache, whereas the
relevant part of the interpreter struct may well not be in the CPU cache at
all. Therefore this change might reduce cache pressure fractionally. A local
variable access should also be simpler machine code on most CPU architectures.
intrpvar.h
pp_sys.c
sv.c