From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23004 invoked from network); 5 Dec 2022 21:21:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Dec 2022 21:21:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1670275308; b=WxBKDUfxTKYsimD0FHfpIq1uD6nKZREuLcqT9K0lgDDLmuCVFbt2JsslbNdaa/0WUXD2TqjZLn 1EmDuDCboHn2qoQn9kSe+gq/OTmDPRm9tf1FNzXQbnY2eXwcEvU0NU+JAXe6em0dQaIxuD8+Ah anYYbmNMJAs2kaKekEVO3pXFG0Evdhoi4gcOhjlURxDu/kDuh6IQCmVVDomvTKaSEopGCs0WBA riyJV5cM9geEWrlmvnzrlNQnGKQhkyP0V7S/jYtNlpYxRMBtwBtW5negabinC9vXVNUi1bo/Ht OURLRWhMSF8+RhG5XLJQOLOj8UL23zAwNszLUmJ7VO0hWg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1670275308; bh=erxf2d5U+oqAWW1Zqxv0KJRk5WWUMR08aRgaDhFsMxk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature; b=loawGm/r0iYD1jZDMPsXK3Bfmt3aMrZIESQgvBFrDPtaHVfnqAIURYmHIAMBmKHt5JegD5oVqt 5ljTTmf8R+QGbntXRcBdvXMq6BBwn4yK5mGmEtbCxFhczaesNIezglYk2bBjk2xozn0n6HewX0 TGBt6l30/ObKve7nYFv9JZGmfzhSNiyyn+GDxjUaPCd6uc5T9zHc+6GLjBpd57elAXuCaHBKsW IZ/7tSXUJIzQh4dxhQHN7SZp1kw4r/m+ADfGhZOYEEry16uM371Fw0HSss11vubG0iqHCaZSFA 8UlRL9ZD5bnsY8mKEupwIokihCE5B98+lzzEUR0PRd+g6Q==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:From:References:To:Subject:MIME-version:Date: Message-id:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=vJnthjIQwfIOvPga+3xJmwcmrRtMCLCmfKTZK/MuSKk=; b=iGeG99/fkwUVsFsI43qimEE/+5 5Ni9wi4JbfkP539+xq2B8aFPyLc9WvRqSR17cxOyNP2b4npuFXRHKzifPJtVekBZMvUiFmGs/PGeR craxByWLi63oqjLyQA/wKCbNWuiwxcFtvy1FBfEfT1Fy0RlKW4qOHotlDxMVtct1sVWxFKA0L8uBO aTMSWS5xB6RuTkpInaZ+qlxc1PgZWZG4h2igNwWJXOAWt/hzK1We7Ev2TYyK904db9iu+6XSfJ+tX bVj6ZEPECI21byLf4e/cX79MCnhFpN8vUVERfZNXMscjjfMvAurc/axKX1F3uvQDcS7y+Q0WK/XxS 1mHK93ZA==; Received: by zero.zsh.org with local id 1p2IuI-00014a-Rn; Mon, 05 Dec 2022 21:21:46 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:60067) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1p2ItY-0000Ms-Vv; Mon, 05 Dec 2022 21:21:02 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RMF001F6SHOIE90@mta03.eastlink.ca> for zsh-users@zsh.org; Mon, 05 Dec 2022 17:20:59 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id 2ItWp6ZmKEN8v2ItXpdXkM; Mon, 05 Dec 2022 17:20:59 -0400 X-Authority-Analysis: v=2.4 cv=IPDESCjG c=1 sm=1 tr=0 ts=638e60bb a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=BOvYsarySfZ1e2fxFfEA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggddugeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <7eadf163-da34-d90b-61ce-b527fb75b597@eastlink.ca> Date: Mon, 5 Dec 2022 13:20:58 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: The elements of enlightenment Content-language: en-US To: zsh-users@zsh.org References: <54bcd6dd-e589-4696-f042-1155b78df9d2@eastlink.ca> <819c9630-f315-8b1c-cb52-3d3ae8de2d5c@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28489 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 2022-12-05 11:58, Roman Perepelitsa wrote: > > Neither printf nor setopt are heavy. Forks are extremely inefficient > though. ... and '$( ... )' is a fork?  Yes, clearly by your example.  Yeah, it spawns another shell, yes? > var=$(printf hello) > printf -v var hello > > On my machine the first line is 1500 times slower than the second. Holy cow, 1500 X ?? I like efficiency in principle even if in practice it's miliseconds. But I have to keep appending to the list for each line, can the 'print -v var' method handle that?  Not important, but it would be satisfying to do the whole thing in the current shell.