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

Re: Slurping a file (was: more spllitting travails)



On Sat, Feb 10, 2024 at 6:59 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> I believe one of the motivating factors for this function was speed,
> and copying all the data an extra time probably doesn't help with
> that.

Where's the extra copy in Stephane's version?

Roman's optimized version uses the (j::) as well, turns out it's
faster at a certain file size to build up the array and then copy it
with the join than it is to append to a string without using the
array.




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