From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: is there a emacs lisp timing command? Date: Tue, 24 Mar 2009 15:07:20 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7dd16824-e521-4b36-a258-7e7f1d6bfbe2@f1g2000prb.googlegroups.com> References: <3a58c551-a1da-4794-8eb3-7de3c504c556@n7g2000prc.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237957375 16418 80.91.229.12 (25 Mar 2009 05:02:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Mar 2009 05:02:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 25 06:04:13 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LmLHf-0005M4-FN for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2009 06:04:11 +0100 Original-Received: from localhost ([127.0.0.1]:60262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmLGI-0007W1-Ei for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2009 01:02:46 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!f1g2000prb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 24 Original-NNTP-Posting-Host: 24.6.175.142 Original-X-Trace: posting.google.com 1237932440 7105 127.0.0.1 (24 Mar 2009 22:07:20 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 24 Mar 2009 22:07:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f1g2000prb.googlegroups.com; posting-host=24.6.175.142; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167953 comp.emacs:98062 X-Mailman-Approved-At: Wed, 25 Mar 2009 00:58:28 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63251 Archived-At: On Mar 24, 1:25=C2=A0pm, Nikolaj Schumacher wrote: > Xah Lee wrote: > > is there a elisp command like timing, that returns the time a function > > took? > > Seems like everybody here has written their own, but Emacs does come with= : > benchmark-run and benchmark-run-compiled. > > It takes garbage collection into account, which can explain fluctuating > results. Thank you all for the help. After reading the replies, it turns out my error was that i mistook microsecond to be 10^-3 but it should be 10^-6. Thanks Nik for the benchmark-run. That'll be helpful too, and the elp profiler down the road. Xah =E2=88=91 http://xahlee.org/ =E2=98=84