From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality Date: Tue, 18 Apr 2017 14:49:35 -0700 (PDT) Message-ID: <0a84e2b3-ae04-4528-8ef1-fd86f9bbeb28@default> References: <87bmrve6n9.fsf@cassou.me> <9502fe98-aed5-4474-aaed-5e88d5c1cd6f@default> <87wpaic662.fsf@cassou.me> <30ea6b31-dc72-4402-9e06-823c2174b826@default> <87wpahbwz0.fsf@cassou.me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492552209 21333 195.159.176.226 (18 Apr 2017 21:50:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Apr 2017 21:50:09 +0000 (UTC) Cc: 26540@debbugs.gnu.org To: Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 18 23:50:05 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 1d0b0e-0005Rx-DA for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Apr 2017 23:50:04 +0200 Original-Received: from localhost ([::1]:44796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0b0k-0004d6-B6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Apr 2017 17:50:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0b0f-0004cu-CG for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 17:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0b0c-0008ON-AV for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 17:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0b0c-0008OJ-6i for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 17:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0b0b-0003lB-Qa for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 17:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Apr 2017 21:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26540 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 26540-submit@debbugs.gnu.org id=B26540.149255219214435 (code B ref 26540); Tue, 18 Apr 2017 21:50:01 +0000 Original-Received: (at 26540) by debbugs.gnu.org; 18 Apr 2017 21:49:52 +0000 Original-Received: from localhost ([127.0.0.1]:55284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0b0S-0003kl-HR for submit@debbugs.gnu.org; Tue, 18 Apr 2017 17:49:52 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:47291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0b0Q-0003kX-EW for 26540@debbugs.gnu.org; Tue, 18 Apr 2017 17:49:51 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3ILndSf018915 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Apr 2017 21:49:40 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v3ILnd1W007709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Apr 2017 21:49:39 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v3ILnb8R012748; Tue, 18 Apr 2017 21:49:38 GMT In-Reply-To: <87wpahbwz0.fsf@cassou.me> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] 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:131744 Archived-At: > > If we do add it, I'd imagine that the implementation should be > > the same (adding `not', as you say), for clarity and consistency > > - unless other things are not equal for some reason (i.e., > > unless there is a good reason not to use the existing > > implementation). >=20 > I updated the patch. Maybe there is a good reason not to use the existing fn. I didn't check the patch or the implementation of `cl-set-exclusive-or', but that function is designed not just to test for equality but also to return the list (set) of elements that are in only one of the argument lists. A naive guess is that when the sets are unequal this would be slower than just a check for equality. You might want to take a look. If that's the case then a simple equality implementation would be better (e.g. throw to a catch as soon as we know they are unequal).