Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: High memory usage on // substitution in one situation, normal usage in other



Bart Schaefer wrote on Sun, 21 May 2017 16:43 -0700:
> The state that is being saved includes the entire tail of the string from
> that point onward, so in the first example it requires approximately
> 1.8MB/2*(the number of zeroes in all integers from 1 to 200000),

The figure in parentheses is:

    % print {1..200000} | tr -dc 0 | wc -c
    88894

(So we can compute the exact predicted memory use and compare it to the
observed use.)



Messages sorted by: Reverse Date, Date, Thread, Author