From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Fri, 17 Nov 2023 07:08:19 +0100 Message-ID: References: <9ab5d2bd-a648-cae0-a4a7-ae86be10af0f@gutov.dev> <87r0kuqxbf.fsf@gmail.com> <54e115a2-fc36-3056-a030-0dbf32416ddb@gutov.dev> <43f290b0-4119-597b-c89a-0fb4c7db1665@gutov.dev> <1e7fe1ef-af7d-3222-7b9e-b569b3c97ccf@gutov.dev> <22e4cb4d-a8f3-1530-881d-b8c59c5d969b@gutov.dev> <339b58d6-5a44-8393-c2cd-4c935147dde3@gutov.dev> <877cmhrcsf.fsf@gmail.com> <56accb10-2a3c-7670-1687-4ae1d7e374e8@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38293"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Stefan Monnier , 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 Fri Nov 17 07:09:16 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 1r3s2V-0009j7-QU for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Nov 2023 07:09:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3s1o-0003iY-Ox; Fri, 17 Nov 2023 01:08:32 -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 1r3s1l-0003i7-PF for emacs-devel@gnu.org; Fri, 17 Nov 2023 01:08:29 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3s1f-0006CL-Vp; Fri, 17 Nov 2023 01:08:29 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40842752c6eso13685135e9.1; Thu, 16 Nov 2023 22:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700201301; x=1700806101; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=LDDeLonVM/U8kTM3u/5bz2P1eew9swXsDJudxX7ioZc=; b=Lm4webOjOJIpTZyCksFfDNrDpKt6AaGOcidBbtvCK1kmQKXfx3A+zZ6PVaHSDSdO8/ xya7/ApYwRzthJjUiZJh/uN0h4BVfhqG7jKlAZRQ6/uYxAq3+huMggXTStnLZU4MYXDN E8fQOr9a7NwP+GDklkHKmjP7G+kVTce2ojdhlzJNFCVr3ZgDQZJLB6WUBJjR0OkGPpPO LmAVMuTWc/LGhwTAgM1tym9Uq80ODc+U/LTV1IlVNagvfoYBHOzlR1VT+gorP8aVnbyd OhraZlnapgiBn7hnF9SvsKhNa9IiYN600T8XaLuFMxbCk2csmA93aaY2KypB0/wcZvQJ x+7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700201301; x=1700806101; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LDDeLonVM/U8kTM3u/5bz2P1eew9swXsDJudxX7ioZc=; b=QLoNh8Fupr9rooP/3BY/ql86U74eR3By3y7T4QVcuYlBQJZJz1BjN2WzudzVPQx2tC l/nB69jZf1WiDF2Zz+Kl3W62M+a1wUxGLhcspGz1oEC7EQ6MmGndzcbrJJ1k1EXlIagY MOY9w9cDBqUHf3DQES8ytsHNeM26HUjm5fF/UQoZ82OBzOmzjxexLC8ka3Xd4DyE8TZ9 CJm15wZ8f6bnAmEKWbSrlUSyRYyxN90V80+weN3dH+mLQxsFr5Z7L3N3tZdUqqwnZAn2 JUEjzWGttwwpoJRbtfvOHU3bz2ICfoPX9cue9uF+mF80QiBufa848ISpdwqPy72tC1Ey 08wA== X-Gm-Message-State: AOJu0YzEVBDMxLN48i3WK3zYImBmDHz40I0fAis2jw/qhpyQbq/Jwpi4 1S1DV/6uKaLVMwkadWC7R9cC1M/oIts= X-Google-Smtp-Source: AGHT+IHh+kEcBhyQLIcUwoga4YXMHHsMlliUxyycXricEp2qTq0/3cEpyjwJ4FFSuQU37uEF9v2z9A== X-Received: by 2002:a05:600c:444a:b0:407:8e85:899f with SMTP id v10-20020a05600c444a00b004078e85899fmr15665146wmn.16.1700201300580; Thu, 16 Nov 2023 22:08:20 -0800 (PST) Original-Received: from Pro.fritz.box (p4fe3a2be.dip0.t-ipconnect.de. [79.227.162.190]) by smtp.gmail.com with ESMTPSA id n18-20020a05600c3b9200b00407efbc4361sm6089136wms.9.2023.11.16.22.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 22:08:20 -0800 (PST) In-Reply-To: <56accb10-2a3c-7670-1687-4ae1d7e374e8@gutov.dev> (Dmitry Gutov's message of "Thu, 16 Nov 2023 23:54:01 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x32f.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:312846 Archived-At: Dmitry Gutov writes: > I think Stefan is not subscribed to this list anymore, so I'll Cc him > in case he has something to add (or considers worth improving). Oops, I didn't realize that, sorry. Hi Stefan :-). > But cl-defmethod with just one method resulting in a simple function > definition in an experimental fact (evaluate (cl-defmethod abc () > 345); then (cl-defmethod abc () 345) returns (lambda nil (progn > 345))), so that must be faster, without any computation of applicable > methods. > > The comment above the code you quoted mentions "generic functions with > a single method"; maybe it was written before the above optimization > was made. That might be a slight misunderstanding. I was not wondering why there is a performance difference between the 1 method case and the rest. I was wondering why it is so large, or can be so large, which I didn't expect from a PCL-like implementation. And the reason for that was my false assumption that it is PCL-like. Sorry for leading you and Joao on wrong tracks by extrapolating from PCL, BTW. Anyway - as I already mentioned I have absolutely no intuition about the performance characteristics of cl-generic's dispatch mechanism. Maybe, Stefan, you can help with that? Possibly in the context of Dmitry's and Joao's case of using seq.el's generic function interface, how do I say it, to replace the sequences part of cl-lib in Emacs?