From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Garreau\, Alexandre" Newsgroups: gmane.emacs.help Subject: Re: Knowing where a function has been used (bis) [Was: Re: Optimising Elisp code] Date: Mon, 08 Oct 2018 17:23:01 +0200 Message-ID: <877eis799m.fsf@portable.galex-713.eu> References: <638fb7dc-6fc5-4645-8793-97a00038a3a8@googlegroups.com> <8hxojvzzzzzz.m4h.xxuns.g6.gal@portable.galex-713.eu> <20181006192457.GB7368@tuxteam.de> <86lg79yl54.fsf@zoho.com> <86d0slrb4h.fsf@zoho.com> <86h8hwplnp.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1539012133 3524 195.159.176.226 (8 Oct 2018 15:22:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2018 15:22:13 +0000 (UTC) User-Agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 17:22:09 2018 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 1g9XMG-0000n9-TD for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 17:22:09 +0200 Original-Received: from localhost ([::1]:46878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9XON-0004me-HB for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 11:24:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9XNP-0004St-I3 for help-gnu-emacs@gnu.org; Mon, 08 Oct 2018 11:23:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9XNN-0008HU-KG for help-gnu-emacs@gnu.org; Mon, 08 Oct 2018 11:23:19 -0400 Original-Received: from portable.galex-713.eu ([2a00:5884:8305::1]:46802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9XNF-0008AK-Fx for help-gnu-emacs@gnu.org; Mon, 08 Oct 2018 11:23:11 -0400 Original-Received: from localhost ([::1] helo=portable.galex-713.eu) by portable.galex-713.eu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9XN7-0005tF-Ph for help-gnu-emacs@gnu.org; Mon, 08 Oct 2018 17:23:01 +0200 X-GPG-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F X-Accept-Language: fr, en, it, eo In-Reply-To: <86h8hwplnp.fsf@zoho.com> (Emanuel Berg's message of "Mon, 08 Oct 2018 16:18:02 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:5884:8305::1 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:118206 Archived-At: On 2018-10-08 at 16:18, Emanuel Berg wrote: > Barry Margolin wrote: > >> And as another answer said, you should only >> bother with functions that are called very >> frequently. You're only saving a few >> milliseconds per call, so if you only call >> the function once an hour the savings >> is insignificant. > > Is there a tool to find out which functions are > called the most often or do you do that by > using your mind and instinct alone? I guess both: knowing what you did you normally should know what functions are the most =E2=80=9Clow-level=E2=80=9D and =E2=80=9Cbasics=E2= =80=9D (like =E2=80=9Cused everywhere=E2=80=9D in loops, or in loops loops, etc.). But afair, there are also integrated profiling tools for emacs lisp=C2=A0: (info "(elisp) Profiling")