This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
File::Glob: short-circuit earlier for list cx
authorFather Chrysostomos <sprout@cpan.org>
Thu, 27 Oct 2011 07:28:02 +0000 (00:28 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 27 Oct 2011 07:28:02 +0000 (00:28 -0700)
commitc0d745862f99b10f1ac50857c753f1a58c7ddb53
tree073f5f254d2d8445bf6b0e85de9aabc71c3a1945
parent960ddb65a25642640884251e9047635391367159
File::Glob: short-circuit earlier for list cx

For <...> without spaces in list context, don’t even bother adding
file names returned by the glob engine to the cached array.  I origin-
ally added a short-circuit that would skip copying the file names from
the cached array on to the stack in that case, because the file names
are already there.  But we can also skip putting them in the array to
begin with, as the cached array is about to be deleted.

This should make things even faster.
ext/File-Glob/Glob.xs