From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.devel Subject: Re: Loading souce Elisp faster Date: Wed, 27 Feb 2013 06:40:04 +0800 Organization: The Church of Emacs Message-ID: <20130227064004.9813ec5d7d5fd480ccec8c7b@gmail.com> References: <87hal05omn.fsf@engster.org> <87wqtv3utc.fsf@engster.org> <87liaa4wp9.fsf@engster.org> <831uc2ye2q.fsf@gnu.org> <87haky4vvg.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361919788 19967 80.91.229.3 (26 Feb 2013 23:03:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2013 23:03:08 +0000 (UTC) Cc: Eli Zaretskii , rms@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: David Engster Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 00:03:31 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UATYV-0002mV-8G for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2013 00:03:27 +0100 Original-Received: from localhost ([::1]:41104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UATYA-0008Al-6N for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2013 18:03:06 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UATY7-0008AS-Gc for emacs-devel@gnu.org; Tue, 26 Feb 2013 18:03:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UATY6-0002ZM-3K for emacs-devel@gnu.org; Tue, 26 Feb 2013 18:03:03 -0500 Original-Received: from mail-da0-f42.google.com ([209.85.210.42]:60905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UATK3-0004DX-4W; Tue, 26 Feb 2013 17:48:31 -0500 Original-Received: by mail-da0-f42.google.com with SMTP id n15so29081dad.15 for ; Tue, 26 Feb 2013 14:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:in-reply-to :references:organization:x-mailer:mime-version:content-type :content-transfer-encoding; bh=Ayoueq8TAEf23lszZokv7N4i5CwuMs8QfkkEsP5rfMk=; b=EDZ0Y6MlYsKTd003QxPZSN97/lAvi92I+qj5MOipRmHXZNe2iXNAmH46zxLMrm1gqI ZJ6DmeWuGFt17TnCb1ylJsae9UJiZSM9CaC6EC82RhQXG6LkPFyZA+n3PRlj7airdh5i QUiSWmcG0MMPfQyOJ2TtypFHbSSzAUFKL+JoYRKabMg1aVOQPL5qIySLQ1Isys3XuGhY XDcgfvbxkVsu8UlhLwXYjXy8OZzNU4unug1U7DeRONwIA3L0ku6F8QoEL7kpUPCzdv3S 5SiBNmXIqOvLsDue4NE1KBY9zNvwrZMS7TB5IxqOCYnxGX1IwPmTREdeLtWwEf5kF5cC f1yQ== X-Received: by 10.68.225.73 with SMTP id ri9mr411pbc.70.1361918413480; Tue, 26 Feb 2013 14:40:13 -0800 (PST) Original-Received: from Emacs ([61.149.229.189]) by mx.google.com with ESMTPS id eh5sm2225933pbc.44.2013.02.26.14.40.08 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Feb 2013 14:40:12 -0800 (PST) In-Reply-To: <87haky4vvg.fsf@engster.org> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.210.42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157411 Archived-At: On Tue, 26 Feb 2013 22:18:27 +0100 David Engster wrote: > Eli Zaretskii writes: > >> I actually tried that, but it took *longer* with the "coding: utf-8;" > >> comment, which is why I thought that this is apparently not working and > >> some additional changes are needed first. > >> Here's what I tried: I took files.el from emacs/lisp and copied it to > >> files_utf8.el and added the "coding" comment there. Then I used this: > >> (setq filename "~/files_utf8.el") > >> (setq final 0) > >> (dotimes (i 1000) > >> (let ((res > >> (benchmark-run (find-file filename)))) > >> (setq final (+ final (car res))) > >> (kill-buffer (find-buffer-visiting filename)))) > >> (message "Result: %f" final) > >> > >> Without the coding-comment, this takes ~7.5s, but *with* the > >> coding-comment it takes ~9.5s. > > Try "coding: utf-8-unix;" instead. > This only reduces the time a tiny bit (could well be within > variance). It's still almost 2s slower. > Maybe I'm doing something stupid. I'd feel more comfortable if someone > else could confirm this. On my machine: without coding-comment: 8.345521 with `utf-8': 11.226320 with `utf-8-unix': 10.710828 with `utf-8-emacs': 12.518312 with `utf-8-auto': 12.239123 > -David -- Best regards, Xue Fuqiao. http://www.emacswiki.org/emacs/XueFuqiao