From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: Loading souce Elisp faster Date: Tue, 26 Feb 2013 22:00:34 +0100 Message-ID: <87liaa4wp9.fsf@engster.org> References: <87hal05omn.fsf@engster.org> <87wqtv3utc.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361912453 15048 80.91.229.3 (26 Feb 2013 21:00:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2013 21:00:53 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 26 22:01:10 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 1UARe9-0007Hf-EE for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2013 22:01:09 +0100 Original-Received: from localhost ([::1]:57691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UARdo-0006ma-NG for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2013 16:00:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UARdj-0006mF-3d for emacs-devel@gnu.org; Tue, 26 Feb 2013 16:00:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UARde-0002xT-Oy for emacs-devel@gnu.org; Tue, 26 Feb 2013 16:00:42 -0500 Original-Received: from randomsample.de ([83.169.19.17]:50389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UARde-0002xD-BC; Tue, 26 Feb 2013 16:00:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=3hvXLCTg2GDI6s9TpVhf/ZddP2RZgcg80mry7L/tdWQ=; b=aTmv26GbREQ5bvFpGJe7RbrlMuHP82PR8XKyzEILcRANyLj/L0/2lHfISnMpezXNjR7nRG/bTpDoYmIt13DUEa3TiBZeS1h1lMI/6K9wRnmwr+zXoeVYsqr9YRtAf2Zc; Original-Received: from dslc-082-083-063-126.pools.arcor-ip.net ([82.83.63.126] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UARdb-0006h4-Et; Tue, 26 Feb 2013 22:00:35 +0100 In-Reply-To: (Richard Stallman's message of "Tue, 26 Feb 2013 15:19:59 -0500") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.93 (gnu/linux) Mail-Followup-To: Richard Stallman , monnier@iro.umontreal.ca, emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 83.169.19.17 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:157401 Archived-At: Richard Stallman writes: > > All we could potentially avoid with the proposal for utf-8 as default > > is the step of choosing the coding system heuristically. This would > > not make it as fast as find-file-literally. It would make it as fast > > as if you had a coding: tag on the first line. How much speedup is > > that? > > I wouldn't know how to test this without implementing it. > > It is simple to test it. Put `-*-coding: utf-8;-*-' on the first line > of the file, then visit it using find-file. How fast is that? > How does it compare, in time, with the two cases you tested? 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. -David