From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#29866: 27.0.50; cl-loop: Calculate the array length just once Date: Mon, 08 Jan 2018 00:39:28 +0900 Message-ID: <874lnxznin.fsf@gmail.com> References: <87wp18179m.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515339501 13759 195.159.176.226 (7 Jan 2018 15:38:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2018 15:38:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 29866-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 07 16:38:17 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYD1a-00039o-CT for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jan 2018 16:38:14 +0100 Original-Received: from localhost ([::1]:56779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYD3Z-0001cu-Q8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jan 2018 10:40:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYD3N-0001bU-Uk for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2018 10:40:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYD3K-0000gi-Qe for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2018 10:40:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59306) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYD3K-0000ga-MK for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2018 10:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eYD3K-0000AC-Da for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2018 10:40:02 -0500 Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jan 2018 15:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 29866 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 29866@debbugs.gnu.org, tino.calancha@gmail.com, tino.calancha@gmail.com Original-Received: via spool by 29866-done@debbugs.gnu.org id=D29866.1515339582593 (code D ref 29866); Sun, 07 Jan 2018 15:40:02 +0000 Original-Received: (at 29866-done) by debbugs.gnu.org; 7 Jan 2018 15:39:42 +0000 Original-Received: from localhost ([127.0.0.1]:39752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYD2z-00009U-Ng for submit@debbugs.gnu.org; Sun, 07 Jan 2018 10:39:42 -0500 Original-Received: from mail-wm0-f50.google.com ([74.125.82.50]:46697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYD2y-00009I-4O for 29866-done@debbugs.gnu.org; Sun, 07 Jan 2018 10:39:40 -0500 Original-Received: by mail-wm0-f50.google.com with SMTP id r78so10085675wme.5 for <29866-done@debbugs.gnu.org>; Sun, 07 Jan 2018 07:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=irA2dBWmB9ycwm0CaUceYnTw+dIsZJJ1/yxA2myIL7g=; b=sHeZiYIs/f2zubQKKQ53xWKUY7N8gC6CRXjStr/7nIUvXaB4ZIJyjjKj9wTY8ZJ7AG s/Im11f+zq5ox17x6sB3J0cToX17kd+zOTLCT1rfzdzbbjSfmfEmq2nZImCp186LiykK dWHp2pXAJ4EXKKh0gthOCtmfnecMNUmgXwNsGuSDopXqmLoTYZOstpALGPXxH7t/MmuZ EdfATHM+SvJPF7Nn/SX51EBjuzDrQAVtL1BbHqnS0xBxvGXTbPvdbvj6ii3yFbgfKoaH /iLriqWGK9KPArXOMPEvAFwjQLDU9QbFQL90PstQdMTiXAfPmHdi8dfJr2jD9W0PftDe Hu0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=irA2dBWmB9ycwm0CaUceYnTw+dIsZJJ1/yxA2myIL7g=; b=W00jnVSHfGtUBf19V6Sez65cIzhibHDZF1CFnS8JDtTlSyRnez2ABEml8Fupk6ubUk EsrYFOA17tfNTFzb36GbGWDSyw8L+Q4T0XZSZaZOzR0JXeMvKeLM6OzXYuANRuq69PG0 vrjQUGWvo+tm8lL2lj79IyQnRXVWwtE72JDvQtv54TAvYLHpUGlo2R9xG/XEMLBIJ/Gh RuYoMLuB/AH6P5cGwfsOFf3MlRu4L9DOpFJTn6PXh93/SqjlNfKFS7T77zoG3Sgj3TyI I1t3PEVCXR1WdXjfdD6h7Zs4bc4k+JpQ5JiKYiDfLTJ962eSE3IuHnF9fF88pmmAkibg guNw== X-Gm-Message-State: AKGB3mKGtpvk7Lp3evY8zG2kRNugtLfDhIMwn8QWl9+Z7bZtXbkIY/G5 n0HLlPm/LTp3gg/hXsy/6+HFOA== X-Google-Smtp-Source: ACJfBouEW/U7Ika723M4vO9h2RAzTxmtacfQs8D5YBXn0HguZUYpGuBi1F5aEf1jSaGtA57RGy3kNw== X-Received: by 10.28.74.72 with SMTP id x69mr7263985wma.126.1515339574022; Sun, 07 Jan 2018 07:39:34 -0800 (PST) Original-Received: from calancha-pc (228.red-83-40-68.dynamicip.rima-tde.net. [83.40.68.228]) by smtp.gmail.com with ESMTPSA id b48sm21403574wrb.1.2018.01.07.07.39.31 for <29866-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Jan 2018 07:39:32 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Wed, 27 Dec 2017 15:54:56 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141868 Archived-At: Stefan Monnier writes: >> X-Debbugs-CC: monnier@iro.umontreal.ca > > Thanks. > >> It looks sensible to calculate the array length just once, >> instead of recalculate it on each iteration: > > I tend to agree, but I don't know very much about the intended semantics > of Common Lisp's `loop` macro, nor about cl-loop's implementation (tho > I admit I did mess with it without being really sure what I was doing). Ok, let's do it. Pushed to master branch as commit 'cl-loop: Calculate the array length just once' (bfca19e475c01f13dbacc7f8b7bb1aecf46cb7e4)