From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: struct.el -- a package to encode/decode binary data Date: Thu, 21 Mar 2002 11:58:34 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: <200203211658.g2LGwYK17907@rum.cs.yale.edu> References: <5x663qgcfp.fsf@kfs2.cua.dk> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1016730039 15544 127.0.0.1 (21 Mar 2002 17:00:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Mar 2002 17:00:39 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16o5vb-00042b-00 for ; Thu, 21 Mar 2002 18:00:39 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16o61t-00017M-00 for ; Thu, 21 Mar 2002 18:07:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16o5vG-00013I-00; Thu, 21 Mar 2002 12:00:18 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16o5tg-0000yj-00 for ; Thu, 21 Mar 2002 11:58:40 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g2LGwYK17907; Thu, 21 Mar 2002 11:58:34 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: storm@cua.dk (Kim F. Storm) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2101 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2101 > I just tried to measure whether there is any difference, by copying > between two strings like this: > (let ((i (length a))) > (while (> i 0) > (setq i (1- i)) > (aset a i (aref b i)))) > > a and b are either both multibyte or both unibyte and initialized > to all NULs. The difference in time is very small if there is any... Try it with a initialized to all NULs and b initialized to all eight-bit-graphic chars. > > If the string holds non-ASCII text, yes. But not in your case, where the > > ``string'' holds binary data, I think. This is only true if binary values between 128 and 256 are represented as a single-byte, but that's not the case in multibyte strings. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel