The benchmarking works by running the subroutines multiple times (the number is specified by first parameter of cmpthese). It is possible to move initialization outside as far as you don't modify them, which is not the case of pop nor shift.
-- Roman