From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#30202: 27.0.50; Code refactoring on assq-delete-all assoc-delete-all Date: Mon, 22 Jan 2018 08:17:44 -0500 Message-ID: References: <87r2qilb3d.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516627029 25256 195.159.176.226 (22 Jan 2018 13:17:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Jan 2018 13:17:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 30202@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 22 14:17:04 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 1edbyA-00062T-9X for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 14:17:02 +0100 Original-Received: from localhost ([::1]:41959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edc09-0004B7-03 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 08:19:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edbzD-0003gQ-W9 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 08:18:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edbz8-0008J2-DM for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 08:18:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edbz8-0008Iu-AW for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 08:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1edbz8-0004N4-4i for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 08:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jan 2018 13:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30202 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30202-submit@debbugs.gnu.org id=B30202.151662706716781 (code B ref 30202); Mon, 22 Jan 2018 13:18:02 +0000 Original-Received: (at 30202) by debbugs.gnu.org; 22 Jan 2018 13:17:47 +0000 Original-Received: from localhost ([127.0.0.1]:37808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edbyt-0004Mb-N2 for submit@debbugs.gnu.org; Mon, 22 Jan 2018 08:17:47 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:38173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edbys-0004MT-5h for 30202@debbugs.gnu.org; Mon, 22 Jan 2018 08:17:47 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w0MDHjg6020916; Mon, 22 Jan 2018 08:17:45 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id E46896080A; Mon, 22 Jan 2018 08:17:44 -0500 (EST) In-Reply-To: <87r2qilb3d.fsf@gmail.com> (Tino Calancha's message of "Mon, 22 Jan 2018 14:24:38 +0900") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6205=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6205> : inlines <6323> : streams <1776772> : uri <2576821> 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:142371 Archived-At: > yesterday was added (how about to announce it in NEWS file?) > the new function `assoc-delete-all', which is pretty much > the same as `assq-delete-all' with `equal' instead of `eq'. > How do you think below patch? How 'bout defining (defun assoc-delete-all (key alist &optional test) (unless test (setq test #'equal)) ...) > IIUC, the byte compiler will carry the substitution > (funcall function foo bar) > into > (function foo bar) > so that compile code won't suffer the funcall overhead, right? IIRC both forms result in the same bytecode except that the longer form will not benefit from inlining and/or the use of specialized bytecodes (e.g. when `foo` is `equal`). Stefan