zsh-users
 help / color / mirror / code / Atom feed
* slow startup of zsh (1x slower than bash)
@ 2018-12-03 16:27 Peng Yu
  2018-12-03 17:37 ` Vadim A. Misbakh-Soloviov
  2018-12-07  2:19 ` Sebastian Gniazdowski
  0 siblings, 2 replies; 19+ messages in thread
From: Peng Yu @ 2018-12-03 16:27 UTC (permalink / raw)
  To: zsh-users

Hi,

The following example shows that zsh startup time is much slower than
other shells. Can this be improved to at least as fast as bash?

==> main.sh <==
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:

set -v
TIMEFORMAT=%R
time for ((i=0;i<100;++i))
do
    :
done
time for ((i=0;i<100;++i))
do
    ./script.sh
done
time for ((i=0;i<100;++i))
do
    ./script.dash
done
time for ((i=0;i<100;++i))
do
    ./script.bash
done
time for ((i=0;i<100;++i))
do
    ./script.ksh
done
time for ((i=0;i<100;++i))
do
    ./script.zsh
done
==> script.bash <==
#!/usr/local/bin/bash
==> script.dash <==
#!/usr/local/bin/dash
==> script.ksh <==
#!/usr/local/bin/ksh
==> script.sh <==
#!/bin/sh
==> script.zsh <==
#!/usr/local/bin/zsh
$ ./main.sh
TIMEFORMAT=%R
time for ((i=0;i<100;++i))
do
    :
done
0.001
time for ((i=0;i<100;++i))
do
    ./script.sh
done
0.339
time for ((i=0;i<100;++i))
do
    ./script.dash
done
0.387
time for ((i=0;i<100;++i))
do
    ./script.bash
done
0.486
time for ((i=0;i<100;++i))
do
    ./script.ksh
done
0.538
time for ((i=0;i<100;++i))
do
    ./script.zsh
done
0.953

-- 
Regards,
Peng

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

end of thread, other threads:[~2019-09-06 14:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 16:27 slow startup of zsh (1x slower than bash) Peng Yu
2018-12-03 17:37 ` Vadim A. Misbakh-Soloviov
2018-12-07  2:19 ` Sebastian Gniazdowski
2018-12-07  2:57   ` Peng Yu
2018-12-07 16:13     ` Julien Nicoulaud
2018-12-07 16:58       ` Peng Yu
2018-12-07 18:06         ` dana
2019-09-04 10:13         ` Peng Yu
2019-09-05 19:00           ` Roman Perepelitsa
2019-09-05 20:30             ` Peng Yu
2019-09-05 20:37               ` Roman Perepelitsa
2019-09-05 20:45                 ` Peng Yu
2019-09-05 21:19                   ` Kaio Augusto
2019-09-06  9:35                   ` Roman Perepelitsa
2019-09-06 12:57                     ` Peng Yu
2019-09-06 13:11                       ` Roman Perepelitsa
2019-09-06 13:19                         ` Sebastian Gniazdowski
2019-09-06 13:44                         ` Peng Yu
2019-09-06 14:10                           ` Roman Perepelitsa

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).