in reply to RE: List non-matching files
in thread List non-matching files

Well since you bring it up... :-)

tilly's patch indeed. One. Very definitely only. But I do have a contribution to the core that apparently will get in over serious (and legitimate) aesthetic complaints by Sarathy:

--- pp_ctl.c.bak Tue Mar 21 00:42:26 2000 +++ pp_ctl.c Tue Apr 25 04:03:36 2000 @@ -736,6 +736,8 @@ if (diff > PL_markstack_ptr[-1] - PL_markstack_ptr[-2]) { shift = diff - (PL_markstack_ptr[-1] - PL_markstack_ptr[-2 +]); count = (SP - PL_stack_base) - PL_markstack_ptr[-1] + 2; + if (shift < count) + shift = count; /* Avoid shifting too often */ EXTEND(SP,shift); src = SP;
Not much, eh? But this has the effect of making a 1-2 map of n things go from being O(n^2) to O(n). Specifically without the patch it is very slow to do this:
%hash = map {$_, 1} 1..100000;
and after the patch this is fast. :-)

Any 1-1 map (eg Schwartzian sort) is fast both before and after. It only matters when you get back more elements than you put in.