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

why is (F) about twice as fast as print -l ?




l=({1..100000000})

% for i in {1..3}; do time (print ${(F)l} > /dev/null); done
( print ${(F)l} > /dev/null; ) 12.08s user 0.35s system 99% cpu 12.473 total ( print ${(F)l} > /dev/null; ) 11.89s user 0.35s system 99% cpu 12.283 total ( print ${(F)l} > /dev/null; ) 11.99s user 0.37s system 99% cpu 12.414 total

% for i in {1..3}; do time (print -l $l > /dev/null); done
( print -l $l > /dev/null; )  22.11s user 2.90s system 99% cpu 25.044 total
( print -l $l > /dev/null; )  22.00s user 3.12s system 99% cpu 25.160 total
( print -l $l > /dev/null; )  22.15s user 3.01s system 99% cpu 25.216 total


--
sergio.




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