From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: Accelerating Emacs? Date: Fri, 28 Oct 2005 14:49:20 +0200 Organization: sometimes Message-ID: <7eek65n6wf.fsf@ada2.unipv.it> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130509227 16977 80.91.229.2 (28 Oct 2005 14:20:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2005 14:20:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 28 16:20:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVV3M-0006JO-9u for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Oct 2005 16:17:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVV3L-0006M1-16 for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Oct 2005 10:17:55 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: ada2.unipv.it Original-X-Trace: quimby.gnus.org 1130503760 4322 193.204.44.145 (28 Oct 2005 12:49:20 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Fri, 28 Oct 2005 12:49:20 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:XKQ9vpgA74by5/2yRdYF/kkaHrA= Original-Xref: shelby.stanford.edu gnu.emacs.help:135063 Original-To: help-gnu-emacs@gnu.org 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:30654 Archived-At: "Herbert Euler" writes: > (let ((i 0)) > (while (< i 20000) > (let ((j 0) s) > (while (< j 10) > (setq s (concat s (char-to-string (+ 50 (random 50)))) > j (1+ j))) > (insert s "\n")) > (setq i (1+ i)))) using repeated `concat' followed by `insert' generates a lot of garbage to be collected (primarily temporary strings). here's a variation that goes faster (how much faster depends on many factors!): (funcall (byte-compile (lambda () (insert (with-temp-buffer (set-buffer-multibyte nil) (let ((s (concat (make-string 10 0) "\n"))) (dotimes (i 20000) (dotimes (j 10) (aset s j (+ 50 (random 50)))) (insert s))) (buffer-string)))))) it may be unsuitable for other data domains, but that's by design... > So perhaps I can restate it like this: if Emacs starts to be slow in > some condition, it is better of using some other tools instead of > it. And I find it very cool of running vim in Eshell. the best tool is your brain, which is nice because it is portable, and subject to "instead" only by its own admission. if you can use it to exploit other tools (including emacs) in various configurations, what more is there to ask? thi