From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Sun, 12 Nov 2023 23:14:12 +0000 Message-ID: References: <12da6bcb-1818-7fbe-12af-8d4607724332@gutov.dev> <87il6bt4z0.fsf@yahoo.com> <8734xetjkk.fsf@yahoo.com> <87cywhsrcf.fsf@yahoo.com> <87cywgx1z0.fsf@web.de> <83wmuowwp3.fsf@gnu.org> <8334xcwank.fsf@gnu.org> <320999cc-6c83-2315-0044-cc0403400af3@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16071"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Gerd_M=C3=B6llmann?= , Eli Zaretskii , michael_heerdegen@web.de, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 13 00:12:11 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r2Jch-00040z-36 for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Nov 2023 00:12:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2Jbv-0006OE-Vb; Sun, 12 Nov 2023 18:11:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2Jbu-0006O6-V3 for emacs-devel@gnu.org; Sun, 12 Nov 2023 18:11:23 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2Jbt-0003O0-3s; Sun, 12 Nov 2023 18:11:22 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50949b7d7ffso5646286e87.0; Sun, 12 Nov 2023 15:11:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699830678; x=1700435478; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NCIY4pQsKICn2eP57pIsOwsWGi/s0+X5zBpX11a8G4A=; b=hvs12K0CP71RNlqMG0XuayEiBe9nLARreewks5nuk0cVPkP8MCb6/0vSYq8952L+rD wvXYegKAvj7FZduhjwsRX4yiEknEmgSP3rnyPfekUnnX3vkxlOolyVTAchgN3X+iqxlN rXgq8uVCfk4xf32jNY2x79ljzT4ONaTHvpUeure9oRkhQ0CJC1W/qCjTA2wtepFVAUMK tF6Na2liEDRFlu7DJPt02RcTVODHB3ZsUzf/7ERyYpn4pE0655DcQAgcSlpjF9gq/GN+ MUyZZ2nd9GZW2+pvgXAcyhBE+jxyfUAndKqOckcHyqw1nNd46bYjIL2w6tQgLVEQvNNe n/Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699830678; x=1700435478; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NCIY4pQsKICn2eP57pIsOwsWGi/s0+X5zBpX11a8G4A=; b=pzUUkcxk16CbTHrzInbC7TtAb2NWTxiUa6qpt4A7spAFwYm61UXbbrKkWYAs002SEI aDNuJE4Nf2brqI5wyej5Qw5P1Gyr5EiQVOrRbwT598n9vas8PA/yUtUUqxiSeSBkp7QR ekjNRl+qfLmbwlcRKMw0Rn51cpzdVjr6MPpnYEbbdHnvEWnOPCCI3cBz6Gj6H2WNt+6B 4BzQgiLb7EKXV+NOUWM+HJZE8NY6H8YLfrTn5n0zM0mIQ3lUNN73H/TQ4kx7tXoaVKjf fh4z/aIoOc7MDY6TS28LrjlwPKWEEDkTioPu5jwop5LnFtMZQVM3zhvNZAcQM0LIAmFF G37w== X-Gm-Message-State: AOJu0YyGZApMertrPicWO3gryz7M7kZVhy8HWqZwAAJPJfMsKdj2gYn/ Wavlz2scAfRKBPAFh1ENLr8R6r7ZUVhGUqSeuME= X-Google-Smtp-Source: AGHT+IGGNiOY9PpxY5VfYyJj1f2IHxzSWiFlTOvjEq3qooDiF5KSbNiRTcbLuuCOiItkXHm4Kb+1MPltceaxJZSnSZA= X-Received: by 2002:a05:6512:3d0d:b0:506:87a3:c27c with SMTP id d13-20020a0565123d0d00b0050687a3c27cmr3811247lfv.53.1699830678109; Sun, 12 Nov 2023 15:11:18 -0800 (PST) In-Reply-To: <320999cc-6c83-2315-0044-cc0403400af3@gutov.dev> Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312668 Archived-At: On Sun, Nov 12, 2023 at 10:09=E2=80=AFPM Dmitry Gutov wr= ote: > So it seems on par with the hand-written version (byte-compiled, too) > that hardcodes the test function. > > Curiously, though, if I make list2 longer (e.g. 12 elements rather than > 6), then my/set-difference starts to win noticeably (0.166 vs 0.200). I have a suspicion, I'll see what I can do. More importantly, there's an important takeaway here. Your results seem to show that regardless of the alternative (cl-lib or hand-rolled) the solution with Emacs's current recommended sequence processing library is nearly 6 times slower in a real-world use-case. Maybe seq.el can be made faster too? Who knows, but it seems difficult without breaking at least some of its defgeneric-based contract. > I'll keep the real-world case as-is (code in project--vc-list-files) > both because the result with cl-nset-difference is still a little > slower, and because it's slower in all released emacsen, but it > definitely becomes an option. Not that I think it's worth it just for this, but isn't cl-lib.el a :core package? Theoretically, we could bump the version and depend on that in project.el, as we do with other such things when one dependency of a core package is enhanced.