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

zsh poor performances while reading and testing ?



hello people,

i recently made a benchmark to emphasize the gain of speed
people can have using filters instead of pure shell loops.
however i was surprised to see how slow zsh is compared to
other shells when it comes to read data.

the interesting part of the benchmark is:

  for it (bash zsh ksh) {
    TIMEFMT=": $it %U %S %E"
    time $it  -c 'while read it; do : ; done < x > /dev/null'
  }

: bash 4,95s 1,21s 6,18s
: zsh 12,65s 28,12s 40,82s
: ksh 9,87s 26,52s 36,42s

is there any obvious reason for that? is there a way to make
it faster without diving in the C code?

regards,
marc



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