I'd like to a read potentially large files (a zsh script file) into an
array fast. It is not uncommon for a GNU autoconf configure script to
be tens of thousands of lines long.  (As an example, The zsh configure
script is over 20,000 lines long).

I know about redirecting input in a loop and/or alternatively using
"read" in a loop. But for a large file this tends to be slow. As a
result, both bash and zsh have a mechanism for doing this faster than
using a read loop. For zsh the speed difference was 0.189 seconds (to
load zsh and the module and read) versus over a minute. For bash the
difference in speeds is, I believe, even greater.

So what's the fastest way to large read a file into an array? 

Thanks.
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to