From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Faster binary IO, please? Date: Thu, 15 Sep 2005 21:14:46 +0200 Message-ID: <85mzme2leh.fsf@lola.goethe.zz> References: <87oe6ukwcz.fsf@lexx.delysid.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1126812139 8331 80.91.229.2 (15 Sep 2005 19:22:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Sep 2005 19:22:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 15 21:22:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EFzHL-0002gw-Li for ged-emacs-devel@m.gmane.org; Thu, 15 Sep 2005 21:20:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EFzHL-0001M5-0P for ged-emacs-devel@m.gmane.org; Thu, 15 Sep 2005 15:20:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EFzG1-0000b0-SR for emacs-devel@gnu.org; Thu, 15 Sep 2005 15:18:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EFzFy-0000YI-9d for emacs-devel@gnu.org; Thu, 15 Sep 2005 15:18:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EFzFy-0000Nk-2M for emacs-devel@gnu.org; Thu, 15 Sep 2005 15:18:50 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EFzDu-0002pD-Tr for emacs-devel@gnu.org; Thu, 15 Sep 2005 15:16:42 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1EFzDu-0003vi-9R; Thu, 15 Sep 2005 15:16:42 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id D4B7B1C460AC; Thu, 15 Sep 2005 21:14:46 +0200 (CEST) Original-To: Mario Lang In-Reply-To: <87oe6ukwcz.fsf@lexx.delysid.org> (Mario Lang's message of "Thu, 15 Sep 2005 20:40:44 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:42964 Archived-At: Mario Lang writes: > > Through the last 4 years of Emacs Lisp coding, I've come across the need > to read and/or write binary data from time to time. Mostly when doing > network process IO, but recently also reading binary data from a buffer. > I've managed to solve all obstacles so far, and wrote the necessary > utility functions to read all sorts of binary data types. However, > these tricks in elisp space imply slow code, and since these are IO > functions, the slowness really counts. This mail is basically a plea > for some improvement in Emacs regarding binary IO. I know we operate > on textual data 99% of the time, but at times, it is just necessary > to operate on binary data if one wants to keep Emacs as the wonderful > and generic working environment that it is. > > Below are all the binary data IO functions I've had to write so far. > If you could have a look please and: > 1. possibly suggest a speedup in the functions as they are now > or > 2. implement some of them as a primitive in C Have you taken a look at define-ccl-program? You could probably do quite a bit of processing with that. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum