From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: killing the result of isearch Date: Mon, 20 Nov 2017 04:24:05 +0100 Message-ID: <867eulzl7u.fsf@zoho.com> References: <8EEDAF80-5CD1-4BEE-8DB2-262BEDA7C829@gmail.com> <87wp2vw9j6.fsf@fliptop> <86r2t32lip.fsf@zoho.com> <87o9o5x4ir.fsf@fliptop> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1511148324 1403 195.159.176.226 (20 Nov 2017 03:25:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Nov 2017 03:25:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 20 04:25:20 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 1eGchv-000817-Nv for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Nov 2017 04:25:15 +0100 Original-Received: from localhost ([::1]:55184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGchz-0001S8-Sj for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Nov 2017 22:25:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGch8-0001S3-8T for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 22:24:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGch4-0006Ju-Ut for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 22:24:26 -0500 Original-Received: from [195.159.176.226] (port=57621 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eGch4-0006Jc-Nw for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 22:24:22 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eGcgq-0004O3-Ly for help-gnu-emacs@gnu.org; Mon, 20 Nov 2017 04:24:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:3/r6/nnidNgZyHhI+YcA5ukuq7o= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:114999 Archived-At: Tomas Nordin wrote: > But there will be only one level of recursion > that I am aware of. Is a recursive function > call slower than a regular function call? > I am aware there is a maximum > recursion depth. Here is what it says in the manual [1] Use iteration rather than recursion whenever possible. Function calls are slow in Emacs Lisp even when a compiled function is calling another compiled function. Which is what I said, right? But it also says Using the primitive list-searching functions ‘memq’, ‘member’, ‘assq’, or ‘assoc’ is even faster than explicit iteration. It can be worth rearranging a data structure so that one of these primitive search functions can be used. "Explicit iteration" = e.g., a `while' loop with a condition and the increment of a variable. This is everyday loop usage in languages such as C, C++ ... "Primitive" = "A 'primitive function' is a function callable from Lisp but written in the C programming language." [2] [1] (info "(elisp) Compilation Tips" [2] (info "(elisp) Primitive Function Type") -- underground experts united http://user.it.uu.se/~embe8573