From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Any interest in a function like this to add to subr.el? Date: Thu, 20 Oct 2016 02:12:42 +0300 Message-ID: References: <68978e0f-03a3-70ec-c18a-e2d12f91ea5c@yandex.ru> <6d541e6d-f7a1-beba-77f5-94d5a06f93cb@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1476918791 15993 195.159.176.226 (19 Oct 2016 23:13:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2016 23:13:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 20 01:13:07 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bx02X-0001ub-Rs for ged-emacs-devel@m.gmane.org; Thu, 20 Oct 2016 01:12:53 +0200 Original-Received: from localhost ([::1]:51537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx02Z-0005vt-0m for ged-emacs-devel@m.gmane.org; Wed, 19 Oct 2016 19:12:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx02T-0005vd-Fq for emacs-devel@gnu.org; Wed, 19 Oct 2016 19:12:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bx02Q-0007kx-Sn for emacs-devel@gnu.org; Wed, 19 Oct 2016 19:12:49 -0400 Original-Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:33010) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bx02Q-0007jq-Kp for emacs-devel@gnu.org; Wed, 19 Oct 2016 19:12:46 -0400 Original-Received: by mail-lf0-x233.google.com with SMTP id x79so51925714lff.0 for ; Wed, 19 Oct 2016 16:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fCc5i0a/szdq59wNzFUWds/lVaCWkAySAUU5iP2QI8o=; b=YprWkoKxljUsYo7wJhGjgtgMuCtXAlJOyfkg/Ta5FEv55trh9WvLgB3dtAAu2Xm1Dv WL9wXY+L3yb/oozF709tls061Q9LpBvuLRzMduGjs483rkocvSd73wwtuh/gOF2wAn35 zXByEpaOxWdBdXaRpXA65z0dvFIKxPz3Jvd4ws2f8q04ZAn5N0+9D/KZr/6QiVfYcu8s F2a1B4Lm/TMgkpJ9gM0vqrzTy9Dhqs9DTVnYIMPu1lpbeB6gTzCU/gsXYWIx7sWm+KyQ r2IIH9uzJq6+1bb7/eO1G6hrQETwVFzJ/QH/10O3Eym6HLy6eUmuWTrwF2XxCnujDqXJ M9VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fCc5i0a/szdq59wNzFUWds/lVaCWkAySAUU5iP2QI8o=; b=kOfThhVaEj+5pOz3NaQ15fWZB5E5ClmcxYCxK2Uz7ZnLhhV4rRGrkEI73heB31mNFA LBd4AX65Sj4sR+2gZ63jSo6P2cD12gOjO8o41SaqDljd38K9izqWntJWyX0wilNRMEhY AZb3CK8C0HPcU+2R/5tRtcHaZr6z4d91m89QlxunwrGNoHMT8H02F8qaTqXYmQb4co+A MwDu02d1vw+ONy//Vhve5CybLgTHe7i7EasTG+5/Jit+mWBqLMzyZ+7V+vRzP5Ex8Vd1 xaR7aPUVXTIjNesBkCknOPmYCDLV1wBktqkwc/k2KN89Lb+/iWVqyQHXbB4JsNWScIdk bbkA== X-Gm-Message-State: AA6/9RmZSZRUAOw7/MxRl1WJchE+qbpCMSTOBCKY6bqIXmsWHgUWh/ExYHKawQCgazkVMA== X-Received: by 10.28.57.84 with SMTP id g81mr6558242wma.91.1476918764984; Wed, 19 Oct 2016 16:12:44 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.173.41]) by smtp.googlemail.com with ESMTPSA id g17sm73049628wjs.38.2016.10.19.16.12.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 16:12:44 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208517 Archived-At: On 19.10.2016 17:48, Stefan Monnier wrote: >> We'd want a destructive version of it as well, though. > > Why? I was thinking for performance. But yeah, we should probably benchmark the two versions on multiple inputs, and only keep the destructive version if it's indeed noticeably faster on some (like big lists where the predicate costs on the order of the magnitude of allocating a new cons).