* Re: Speed of all-completions [not found] <m3ekp2lycr.fsf@defun.localdomain> @ 2010-04-29 15:14 ` Stefan Monnier 2010-04-29 15:41 ` Lawrence Mitchell 0 siblings, 1 reply; 2+ messages in thread From: Stefan Monnier @ 2010-04-29 15:14 UTC (permalink / raw) To: Jesper Harder; +Cc: emacs-devel Barely 6 years ago, Jesper Harder <harder@ifa.au.dk> wrote: > I use icomplete-mode and I've noticed that it feels more sluggish in > cvs Emacs than in Emacs 21.3. > Profiling shows that the bulk of the time is spent in > `all-completions', so I tried to benchmark it with this example: > (defmacro time (form) > `(let ((t1 (float-time))) > ,form > (- (float-time) t1))) > (let ((oba (make-vector 255 0))) > (dotimes (i 10000) > (intern (format "f%i" i) oba)) > (time > (all-completions "f" oba))) > The time used was: > cvs Emacs: 0.16448211669921875 > Emacs 21.3: 0.01507115364074707 > i.e. `all-completions' is roughly an order of magnitude slower in cvs > Emacs. I cannot reproduce it now. I tried it with `emacs21', `emacs22', and `emacs23' (under Debian testing, and adding a 0 to the number of iterations of your test), and I do see that Emacs is getting slower, the difference is not nearly as large, changing from 0.05s to 0.06s, basically. Stefan "you can always count on a prompt answer" ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Speed of all-completions 2010-04-29 15:14 ` Speed of all-completions Stefan Monnier @ 2010-04-29 15:41 ` Lawrence Mitchell 0 siblings, 0 replies; 2+ messages in thread From: Lawrence Mitchell @ 2010-04-29 15:41 UTC (permalink / raw) To: emacs-devel Stefan Monnier wrote: > Barely 6 years ago, Jesper Harder <harder@ifa.au.dk> wrote: [...] > I cannot reproduce it now. I tried it with `emacs21', `emacs22', and > `emacs23' (under Debian testing, and adding a 0 to the number of > iterations of your test), and I do see that Emacs is getting slower, the > difference is not nearly as large, changing from 0.05s to > 0.06s, basically. FWIW, I see the same behaviour here 2 times out of 3. On the third occasion, Emacs takes about half a second in GC. With the following test case: (defvar foo-ob nil) (defun foo (n) (when (null foo-ob) (setq foo-ob (make-vector 255 0)) (dotimes (i n) (intern (format "f%i" i) foo-ob))) (time (all-completions "f" foo-ob))) (byte-compile 'foo) (setq garbage-collection-messages t) (setq gc-cons-threshold 400000) (foo 100000) With (setq gc-cons-threshold 4000000) all-completions GCs one time in five. Cheers, Lawrence -- wence@gmx.li ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-29 15:41 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <m3ekp2lycr.fsf@defun.localdomain> 2010-04-29 15:14 ` Speed of all-completions Stefan Monnier 2010-04-29 15:41 ` Lawrence Mitchell
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.