From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master 68c09c6: Better CPS conversion of multi-binding `let` Date: Tue, 30 Nov 2021 08:42:50 -0500 Message-ID: References: <20211130120404.23495.29099@vcs0.savannah.gnu.org> <20211130120405.6C5F4209FD@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32875"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Mattias =?windows-1252?Q?Engdeg=E5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 30 14:45:22 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ms3Rh-0008Id-1x for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Nov 2021 14:45:21 +0100 Original-Received: from localhost ([::1]:39318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ms3Re-00009e-TH for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Nov 2021 08:45:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ms3PO-0007gD-RQ for emacs-devel@gnu.org; Tue, 30 Nov 2021 08:42:58 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ms3PL-0002pG-MJ for emacs-devel@gnu.org; Tue, 30 Nov 2021 08:42:57 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4DA8A44139B; Tue, 30 Nov 2021 08:42:53 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C91A3441380; Tue, 30 Nov 2021 08:42:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1638279771; bh=5sJ4sth8xA9xk1srOHtVibhyJVAd2mqtfcEMtJH5WvU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XM1fD2Ie5PH+TFIcEa6GPthnlPNzdMgjbcqK2zQbYX88VO9DSSAlxMxgWcAzqWtuR hoZ1NTYrIHxuT8gtUoPMe84QdbLZtT6UBWtercm+mjsB0fm+mRoRi7NuCbys8913Vo HklbnWH7CzvyNc7oeADkR+uckduawv7fkhKX0KcevPLNNkUQht7ltfYp2CNAkcuLIn rs6A7QFZ+lWdU7UZeZF0E2eq1+IzndqSxiR/tnyhudGo0+fmmF7oaSeuK/1myx1Heb 9xb7D99dUys977qCWWk/rawC5jO96uL1eoeLiBIybtekrp7np5ls1F4Lc+0MBahGlZ xFWuJWlH0zrrA== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A6B911201BD; Tue, 30 Nov 2021 08:42:51 -0500 (EST) In-Reply-To: ("Mattias =?windows-1252?Q?Engdeg=E5rd=22's?= message of "Tue, 30 Nov 2021 14:30:43 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280534 Archived-At: >> I think this optimization can be generalized to the multi-var case by >> noticing that the transformation of (vN eN) into a pair (tN eN) ... (vN tN) >> is not necessary because the order of the (v1 t1) ... (vN tN) doesn't matter >> so we can move (vN tN) to the beginning, right next to (tN eN) and then >> merge them back. > > Not sure how that would work unless you imply some kind of dependency > analysis. Maybe you have an example in mind? No dependency analysis needed, just always turn (let ((x1 e1) ... (xN eN)) BODY) into (let* ((t1 e1) ... (tN-1 eN-1) (xN eN) (x1 t1) .. (xN-1 tN-1)) BODY) -- Stefan