From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: One example of code I can't understand Date: Wed, 22 Jul 2009 15:58:28 +0900 Message-ID: <87ab2xgq5n.fsf@uwakimon.sk.tsukuba.ac.jp> References: <833a8soxmc.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248246122 14996 80.91.229.12 (22 Jul 2009 07:02:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Jul 2009 07:02:02 +0000 (UTC) Cc: eliz@gnu.org, rms@gnu.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 22 09:01:55 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MTVpp-00036g-3F for ged-emacs-devel@m.gmane.org; Wed, 22 Jul 2009 09:01:53 +0200 Original-Received: from localhost ([127.0.0.1]:53683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTVpo-0003ZC-Ii for ged-emacs-devel@m.gmane.org; Wed, 22 Jul 2009 03:01:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTVpk-0003Z5-1E for emacs-devel@gnu.org; Wed, 22 Jul 2009 03:01:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTVpe-0003Xk-Mq for emacs-devel@gnu.org; Wed, 22 Jul 2009 03:01:46 -0400 Original-Received: from [199.232.76.173] (port=51700 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTVpe-0003XV-CR for emacs-devel@gnu.org; Wed, 22 Jul 2009 03:01:42 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:9681) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTVpZ-000207-5o; Wed, 22 Jul 2009 03:01:37 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTVpX-0004j1-Ih; Wed, 22 Jul 2009 03:01:35 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 13516821B; Wed, 22 Jul 2009 16:01:27 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id F1D7111FB18; Wed, 22 Jul 2009 15:58:28 +0900 (JST) In-Reply-To: X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" 5bbff3553494 XEmacs Lucid (x86_64-unknown-linux) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112988 Archived-At: Kenichi Handa writes: > It is theoretically possible to modify all of them to use a > multibyte buffer that contains only ASCII and eight-bit > chars. But, as it may make the operations slow, I don't see > a merit in doing that. XEmacs has always done it this way; it is more than a theoretical possibility. In XEmacs it doesn't make much difference for the operations you describe (less than a factor of 2) because the overhead of interfacing to the pipes is greater than the overhead of conversion. This is based on some profiling Ben did many years ago; ISTR it was basically linear up to 128MB or maybe 256MB. I don't recall the exact numbers, but I do remember being very surprised that it was substantially less than 2. In XEmacs, I think it makes a much bigger difference for mail buffers (VM, or Gnus nnfolder) because of the frequency of byte<->char conversions in those more or less random access applications.