From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: return first element in list with certain property Date: Tue, 21 Nov 2017 19:37:01 +0100 Message-ID: <87zi7feawi.fsf@web.de> References: <8660a60zjn.fsf@zoho.com> <87mv3gzndx.fsf@ericabrahamsen.net> <86ine4y7jy.fsf@zoho.com> <874lpozk0y.fsf@ericabrahamsen.net> <8660a4xuou.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511289480 18373 195.159.176.226 (21 Nov 2017 18:38:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Nov 2017 18:38:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Philipp Stephani Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 21 19:37:51 2017 Return-path: Envelope-to: geh-help-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 1eHDQZ-0003kl-V9 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Nov 2017 19:37:48 +0100 Original-Received: from localhost ([::1]:35995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHDQe-0006cN-3D for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Nov 2017 13:37:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHDPy-0006an-Ft for help-gnu-emacs@gnu.org; Tue, 21 Nov 2017 13:37:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHDPt-0002aa-KN for help-gnu-emacs@gnu.org; Tue, 21 Nov 2017 13:37:10 -0500 Original-Received: from mout.web.de ([212.227.17.12]:60148) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHDPt-0002Zw-Av for help-gnu-emacs@gnu.org; Tue, 21 Nov 2017 13:37:05 -0500 Original-Received: from drachen.dragon ([88.66.201.17]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lrazp-1fIEdP2UV3-013Pbq; Tue, 21 Nov 2017 19:37:02 +0100 In-Reply-To: (Philipp Stephani's message of "Tue, 21 Nov 2017 18:01:40 +0000") X-Provags-ID: V03:K0:VsIfUnkgQcpmT139zusGE98sA8EMp+X6cTx3KolJhTe+aYJmgDz gehEYL4iXBxAi53FSFhTEsFSP7ZXGXqT/mXs6Tzy2duWAOu/WiDP1w6A5qacQSEtjb/38Uq rNVwNoz4YW1x6tj/oRFoTG+mCGdaxDR5CY1SXvqcuNtYRsKwu9qSufgAsjeM2R8fnVCidmw zN2dQwSR7iqVltZTeqZcg== X-UI-Out-Filterresults: notjunk:1;V01:K0:wO47Fwao+i0=:IsJuErfgdqNB+M3uAtQNwm 83xfW8DPSjuW7yqFutepEu2F5RSyeNHEeoUfUbFW+8p94UZ6zGQstdVsb307blgTqgnErHk4M z4fZa+4yxJF9fP6yc+2YzMVVfBn56jUfm9YNGtDxK1P7q01P1fm68S76Vl7P/XLArhPRKy2pi T04CN9YmL3Pm2hVIOK9kWNtTm8/TBzVs23c+2tndhAvhtVF4y2fvnDzWzkeW70x4SyawYZ1QB 3ZP8Bqn7c/mPQt3HXLSp2QSCIpjAImu+AEc2H6e3yzWB9N0LWV2ba+p9H84P+YIxpX1Y8cTO9 E1LUwcZSBg6aDH1PLcb21B66WoWqPSmYAq2AV1UyJhaUAmljmMQML/zlvTua5Z2qg6uFpqZy2 Nn0W9HjVqja0rubJtQCu6Pt6PNQhgSoXqZPv8kE0+sKODkidtzsWTvxPOYsj0nx7ngkeUQPLd SHCE91ghF3kC7wrnZw5d4RmAuUJd6fzCUdzYdJEewCCogIgtE9Rt91qXJqk5Di1AVgZ7b5Zgs YZNNTAYTXKieLORycPjhrLb2YDdNcxOgTZGrCgGv/fHbaBsXjoETj7SCRazvs1Y+LdQ0isuSO 9U9umgygc/HGMBdaAliRv0mF/z9JmVrQmgnaU1RKKBMdydyjDW7VSyRX8GDHm03T0IgB0RQOy zhGtMAtJhaMKsOzCwO6yyArrr6/y+5YuydLDOsAA/wsqYEhswjSfdgTRBRcH5HJGY+BwN3Fz6 jJWgH2ZFhGsfdsbXb9KjBAh9azGTEfjegp0mw2iG2/p9GzzRftHENy1/fX65ATjmy05du8g/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115034 Archived-At: Philipp Stephani writes: > Please consider Knuth's statement about premature optimization. Until > your users have actually complained about the speed of your product > and you have benchmarked it and isolated cl-find-if as the culprit, > there's no need to micro-optimize. Presumably cl-find-if has performed > two iterations for years or decades without anybody being bothered > enough to improve it. Not only that. Seems the second iteration is at least ~50 times faster than the first one (using `elt' that is much faster than a loop), so it doesn't matter anyway. If your program is slow, the second iteration will never be the culprit. Michael.