emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 23.0 is much slower than Emacs 22.3. Maybe it's the garbage co


From: Alan Mackenzie
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
User-agent: Mutt/1.5.9i

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).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]