From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25605: [DRAFT PATCH 1/2] Simplify use of FOR_EACH_TAIL Date: Thu, 02 Feb 2017 19:29:43 +0200 Message-ID: <83vassv6uw.fsf@gnu.org> References: <20170201235622.30836-1-eggert@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1486056674 5441 195.159.176.226 (2 Feb 2017 17:31:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2017 17:31:14 +0000 (UTC) Cc: eggert@cs.ucla.edu, 25605@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 02 18:31:10 2017 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 1cZLDy-00018K-06 for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 18:31:10 +0100 Original-Received: from localhost ([::1]:58128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZLE1-0007RU-Uq for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 12:31:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZLDt-0007QV-Bn for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:31:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZLDq-0008Vs-AL for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:31:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56036) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZLDq-0008Vo-6E for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cZLDp-0001dW-Uq for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Feb 2017 17:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 25605-submit@debbugs.gnu.org id=B25605.14860566096227 (code B ref 25605); Thu, 02 Feb 2017 17:31:01 +0000 Original-Received: (at 25605) by debbugs.gnu.org; 2 Feb 2017 17:30:09 +0000 Original-Received: from localhost ([127.0.0.1]:54235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZLCz-0001cN-Fs for submit@debbugs.gnu.org; Thu, 02 Feb 2017 12:30:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZLCy-0001bM-2l for 25605@debbugs.gnu.org; Thu, 02 Feb 2017 12:30:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZLCs-00080i-4Q for 25605@debbugs.gnu.org; Thu, 02 Feb 2017 12:30:03 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZLCo-0007yN-5s; Thu, 02 Feb 2017 12:29:58 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2395 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cZLCn-0006Zx-AY; Thu, 02 Feb 2017 12:29:57 -0500 In-reply-to: <20170201235622.30836-1-eggert@cs.ucla.edu> (message from Paul Eggert on Wed, 1 Feb 2017 15:56:21 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:128887 Archived-At: > From: Paul Eggert > Date: Wed, 1 Feb 2017 15:56:21 -0800 > Cc: Paul Eggert > > * src/data.c (circular_list): New function. > * src/lisp.h (FOR_EACH_TAIL): Use Brent’s algorithm and C99 for-loop > decl, to eliminate the need for the args TAIL, TORTOISE and N, and > to speed things up a bit on typical hosts with optimization. > All uses changed. Thanks, but I wonder if you could add some tests for the relevant functions, I really feel uneasy about changing the implementation of such basic functionality without any regression tests.