From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Measuring execution time of a function Date: Sun, 23 May 2021 11:42:37 -0400 Message-ID: References: <83cztij5ky.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24068"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: dalanicolai Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 23 17:43:33 2021 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 1lkqGL-00063H-E3 for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 17:43:33 +0200 Original-Received: from localhost ([::1]:37738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkqGK-0005Ir-1v for ged-emacs-devel@m.gmane-mx.org; Sun, 23 May 2021 11:43:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkqFY-0004d1-1q for emacs-devel@gnu.org; Sun, 23 May 2021 11:42:44 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkqFV-0008RT-Kf; Sun, 23 May 2021 11:42:43 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1F518440320; Sun, 23 May 2021 11:42:40 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C720D4404AD; Sun, 23 May 2021 11:42:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1621784558; bh=OrDfneZldfsiijDNh28d1o9m41e8xGC5XYnOlx2xmdg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GbCru3SwYP6aWdaEG04RUXxbAheQ5T8VivaVAoAKJ/B0qIVzXDg1pVJcWiPNpC1og fHg1Ix5aszOGVTb7QvDt23ELx3DjEHPdEK55FdJwY486lWHGdTza46/GRdNVw13Wtk nQf3NB14pEJXK9VKSEYSvyjBKJY7FPItdXgOenSc6d3+yFJH2cgoaEmCbAflrDWjat BPD9P4jgWkYmC9BbcDeBRuvl6QQHbkg15X3D7rEM5vnTJzxmr3TI+LMoMI9cwV8RAV zF+KPbhRoaQ4JWuWgMPUN1yZonjPtdrY8BmOS+6O9f5yVQ33eSLIczosYs7Tbx+rkm v1AwBLWUyGKgA== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7A2EA120728; Sun, 23 May 2021 11:42:38 -0400 (EDT) In-Reply-To: (dalanicolai@gmail.com's message of "Sun, 23 May 2021 10:39:19 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, PDS_TONAME_EQ_TOLOCAL_SHORT=1.999, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:269676 Archived-At: > I used > [the macro posted here]( > https://stackoverflow.com/questions/23622296/emacs-timing-execution-of-function-calls-in-emacs-lisp > ) > to time it. I would vote for adding that macro to Emacs b.t.w., if there is > not > some hidden alternative command already. `benchmark-call` or `benchmark-elapse` should do the trick. Stefan