From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Need some help with Rmail/mbox Date: Mon, 22 Sep 2008 10:10:48 -0400 Message-ID: References: <87y71o4xw6.fsf@xemacs.org> <48D33A10.4040102@pajato.com> <871vzfi93y.fsf@xemacs.org> <03b276ff-e070-465e-9486-c02e4725a3e0@broken.deisui.org> <1bd9e4e5-9349-438b-92af-c2a6293491e7@broken.deisui.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222092728 6780 80.91.229.12 (22 Sep 2008 14:12:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2008 14:12:08 +0000 (UTC) Cc: pmr@pajato.com, eliz@gnu.org, ueno@unixuser.org, stephen@xemacs.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 22 16:13:04 2008 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 1Khm95-00059F-WE for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2008 16:12:12 +0200 Original-Received: from localhost ([127.0.0.1]:39217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Khm84-0008Bb-2R for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2008 10:11:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Khm7y-0008Ax-TD for emacs-devel@gnu.org; Mon, 22 Sep 2008 10:11:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Khm7t-00089l-Of for emacs-devel@gnu.org; Mon, 22 Sep 2008 10:11:02 -0400 Original-Received: from [199.232.76.173] (port=49457 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Khm7t-00089f-J6 for emacs-devel@gnu.org; Mon, 22 Sep 2008 10:10:57 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:45119) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Khm7n-00016k-MP; Mon, 22 Sep 2008 10:10:51 -0400 Original-Received: from alfajor.home (vpn-132-204-232-42.acd.umontreal.ca [132.204.232.42]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m8MEBJIo002632; Mon, 22 Sep 2008 10:11:19 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id 7A8361C133; Mon, 22 Sep 2008 10:10:48 -0400 (EDT) In-Reply-To: (Kenichi Handa's message of "Mon, 22 Sep 2008 13:31:56 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3108=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:104033 Archived-At: > (1) Do decode-coding-region while specifying a multibyte > buffer as TARGET. > (2) Insert the contents of unibyte buffer into a multibyte > buffer, and then perform decode-coding-region in that > multibyte buffer. > (3) Get a unibyte string form a unibyte buffer, and then > decode it while specifying a multibyte buffer as TARGET. > (4) Deocde a unibyte buffer into a mulitbyte string, and > then insert it into a multibyte buffer. > (Please note that using decode-coding-region directly in a > unibyte-buffer is not reliable because if a coding system > has post-read-converion function, that funcion (usually) > works only in a mutlibyte buffer.) > The efficiency is (1) > (2) > (3) > (4). I'd have expected 3 to be more efficient than 2 since it doesn't need to use the variable width multibyte representation of binary data. [ I'd even expect 3 to be about as efficient as 1. ] Is this because of the need to copy the string contents to a temp buffer in order to run any potential pre-read-conversion function? Stefan