From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Emacs 23.0 is much slower than Emacs 22.3. Maybe it's the garbage collector. Date: Fri, 24 Oct 2008 11:59:02 +0000 Message-ID: <20081024115902.GC1763@muc.de> References: <20081022091136.GB924@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224848972 25212 80.91.229.12 (24 Oct 2008 11:49:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 11:49:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: David De La Harpe Golden , Eli Zaretskii , monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 24 13:50:33 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KtLBY-0007fZ-EG for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 13:50:32 +0200 Original-Received: from localhost ([127.0.0.1]:45978 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtLAS-0002n2-Qz for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 07:49:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtLAO-0002mt-V3 for emacs-devel@gnu.org; Fri, 24 Oct 2008 07:49:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtLAO-0002mh-8N for emacs-devel@gnu.org; Fri, 24 Oct 2008 07:49:20 -0400 Original-Received: from [199.232.76.173] (port=32874 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtLAO-0002me-3h for emacs-devel@gnu.org; Fri, 24 Oct 2008 07:49:20 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:3871 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KtLAN-0004Fv-Ii for emacs-devel@gnu.org; Fri, 24 Oct 2008 07:49:19 -0400 Original-Received: (qmail 34164 invoked by uid 3782); 24 Oct 2008 11:49:17 -0000 Original-Received: from acm.muc.de (pD9E23A1C.dip.t-dialin.net [217.226.58.28]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 24 Oct 2008 13:49:14 +0200 Original-Received: (qmail 5257 invoked by uid 1000); 24 Oct 2008 11:59:02 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104943 Archived-At: Hi, emacs.devel! On Wed, Oct 22, 2008 at 05:02:57PM -0400, Richard M. Stallman wrote: > Emacs 23 thus starts up at about three fifths the speed of 22. This is > very noticeable, and not a good thing. > > How about putting code to record the current time > at a few places in startup.el, in both versions? > That way you can maybe find out which parts of the code > have got slower. Put the following into time-cons.el: ######################################################################### (let ((c '(0 . 1)) (n 0)) (while (< n 10000000) ; ten million (setq c (cons 0 n)) (setq n (1+ n))) c) ######################################################################### Now run time emacs -Q -batch -l time-cons.el Emacs 22 Emacs 23 real 0m23.603s 0m32.733s user 0m23.523s 0m32.595s sys 0m0.019s 0m0.053s [David: You might want to try 100 million, or even 10^9. :-] Is ten million conses enough to trigger garbage collection? If so, that could be a problematic area. However, the following gave the same timings on both 22 and 23: ######################################################################### (let ((c '(0 . 1)) (n 0)) (while (< n 10000000) ; ten million (setcdr c n) (setq n (1+ n))) c) ######################################################################### -- Alan Mackenzie (Nuremberg, Germany).