From nobody Thu Sep 23 03:55:12 2021 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8888917D650E for ; Thu, 23 Sep 2021 03:55:16 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HFLsc3WqGz4h3S; Thu, 23 Sep 2021 03:55:16 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1632369316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7s7GbL36TevvB6JPkRTBY5Bv012+szPjHkHraYZHq8U=; b=Sr21xAPa4/PEzVEN5vRY6gPYvP4hbe3We9Cv5exmQbND4CGTSEiJmST7IoO1jBKOjcKdZ+ bU15HuTf+nlXqvE+gjrhDq+JkjDz1vvFT+Fpq61KiG62ZzN9cd1brfb5zCd8fwM+KlAY1G d7dJJ2GYUxvtWsOncqn59Swb6GNbfIG6d1ozJIR8vLN6Wyl4PEuwYmhaYasljGxu8zCdrt a68UBHnFplGi4/Yi8JKq2QeTj/lBy/Gf36kYoNHic48eB4SKcOpVbUCAV4GctmLGTm7V/n 2z8ElBZ2TCKaaF+f3Y2Ut2rP3TV12TPltGu8xnEeh6o6E0ByNbgHqzCCjIH5dw== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 5AC0614BFA; Thu, 23 Sep 2021 03:55:16 +0000 (UTC) From: Jan Beich To: grarpamp Cc: current@freebsd.org Subject: Re: [HEADSUP] making /bin/sh the default shell for root References: <20210922083645.4vnoajyvwq6wfhdf@aniel.nours.eu> Date: Thu, 23 Sep 2021 05:55:12 +0200 In-Reply-To: (grarpamp@gmail.com's message of "Wed, 22 Sep 2021 16:50:03 -0400") Message-ID: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1632369316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7s7GbL36TevvB6JPkRTBY5Bv012+szPjHkHraYZHq8U=; b=tvCW6Zw579bPlSeuMepqX22h36Whjnk5ASs3MmDKwfHXwHaf9QGa3WYsS7NG4nEaIFlsl9 T0/BRdc64kBRywzZw+SWAz/7yk9g6f5CtoU78DgphOB73N83I/07LnawG5r54S9VQHps5w A2OFGTdKhv2BEIovSAVOH4U60m+PYy37s4+rTGGuMcd5qX7dMPeK++gZmEt+E7f8CxvPJS hAyMJxE6Y9kdouhHwPwVxoCIym1rjPcCy1uw0Q4UkT8hm+agT9XV+5DOBMrUGVxYnSJBJf IdbE0PgvjZNoOg0jWL5MuIUOkX5vx/eQRnpZy6s8zxJnbrpfCgQRA6mJ590+/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1632369316; a=rsa-sha256; cv=none; b=O/5WqxcO/jpuC95iB7Kej2nPiNYcWc7/UMAxMgnRIEm36s0dqH7VBmFxvigh6NKl3F9NIL 32SwkIeM6Mtr+gFTbxGm9rbsGmhCmMFZhmfhpgaaNg0Y63f95TvdjjFnA2J4v3ggwl/e8P iIl6/BQx5L/E2XmhASfsEIblMSzvLoVNtGM9y7y6YwDz357t9EWtB3AGnTx2LmanJwg0u/ UNIRHkCbU8iwblEqkb7xqF7ZyDh5zsAk5DuQxW2RdiRSySPBkk5qG2wWhEp23ZkIPFDIUQ HraMD0dktK8/F8XVzBtJwTLdmy7fKpMhe9gBqcKMhcn7nslnSKPi5fjP5MNQlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N grarpamp writes: > BSD community can definitely volunteer to make benchmark of > its shell vs others, determine if and where improvements to make. > Many apps never get checked for obvious speedups, > if so it might become fastest shell even with the new features. Like https://github.com/shellspec/shellbench ? I did check a month ago (on 2021-08-31) but forgot NetBSD sh(1). Obviously, the results may vary per OS/version/architecture/hardware. $ ./shellbench -s sh,dash,busybox/sh,bash,zsh,oksh,ksh93,yash sample/*.sh ---------------------------------------------------------------------------------------------------------------------- name sh dash busybox/sh bash zsh oksh ksh93 yash ---------------------------------------------------------------------------------------------------------------------- assign.sh: positional params 1,983,164 747,830 666,979 443,083 551,071 875,915 479,129 395,225 assign.sh: variable 2,405,745 827,904 741,112 616,017 1,308,457 1,013,153 588,698 510,636 assign.sh: local var 2,398,554 834,027 747,871 603,486 1,293,027 1,007,511 error 503,410 assign.sh: local var (typeset) error error error 616,483 1,306,641 1,011,383 544,136 504,782 cmp.sh: [ ] 1,628,216 567,700 465,761 352,438 336,288 713,738 518,768 297,987 cmp.sh: [[ ]] error error error 480,974 595,441 903,502 613,269 376,550 cmp.sh: case 2,527,633 1,196,339 1,024,253 606,588 632,811 959,232 628,183 450,893 count.sh: posix 1,640,683 717,178 589,330 463,934 907,140 700,233 376,361 398,937 count.sh: typeset -i error error error 452,029 907,541 652,885 385,585 error count.sh: increment error error error 581,631 1,264,962 845,738 581,111 error eval.sh: direct assign 1,670,797 564,299 518,082 308,709 198,714 722,050 285,150 279,020 eval.sh: eval assign 1,102,774 393,161 332,925 194,636 156,834 476,164 173,156 192,191 eval.sh: command subs 2,188 5,828 4,830 2,208 1,597 5,015 ? 4,302 func.sh: no func 2,451,641 836,115 756,258 614,579 711,116 1,087,770 571,210 507,644 func.sh: func 1,947,254 596,731 542,519 349,748 187,903 845,681 306,506 313,989 null.sh: blank 3,094,116 error error error 1,529,326 1,304,367 error 593,711 null.sh: assign variable 2,419,811 845,676 751,887 669,694 1,374,858 1,012,724 599,490 533,401 null.sh: define function 2,687,933 1,259,149 1,076,947 661,432 1,270,777 1,085,654 584,490 525,184 null.sh: undefined variable 2,445,429 839,334 750,904 505,147 631,862 1,048,805 473,900 501,851 null.sh: : command 2,418,617 839,744 742,385 610,307 701,972 1,064,089 565,323 500,879 output.sh: echo 1,518,368 669,539 620,417 404,729 544,030 781,488 540,064 380,174 output.sh: printf 1,481,745 632,454 535,170 395,649 534,303 1,556 258,827 365,724 output.sh: print error error error error 542,740 775,812 353,320 error subshell.sh: no subshell 2,330,179 819,359 729,753 571,353 705,892 1,005,262 560,780 485,498 subshell.sh: brace 2,343,747 833,142 728,803 554,948 568,470 984,156 557,069 413,438 subshell.sh: subshell 3,444 6,917 2,814 1,190 3,578 3,391 240,738 2,570 subshell.sh: command subs 1,871,462 3,806 5,966 2,766 2,709 4,564 146,388 3,691 subshell.sh: external command 1,112 996 579 893 2,190 2,529 1,728 1,778 ---------------------------------------------------------------------------------------------------------------------- * count: number of executions per second