zsh-users
 help / color / mirror / code / Atom feed
* why is (F) about twice as fast as print -l ?
@ 2023-02-06  4:15 sergio
  2023-02-06  5:03 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: sergio @ 2023-02-06  4:15 UTC (permalink / raw)
  To: zsh-users


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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-06  5:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06  4:15 why is (F) about twice as fast as print -l ? sergio
2023-02-06  5:03 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).