From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roland Orre Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: About shared substrings (now working) Date: Wed, 21 Jan 2004 06:21:14 +0100 Organization: Royal Institute of Technology Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <1074662474.6727.396.camel@localhost> References: <1074467565.6733.300.camel@localhost> <87smiajeut.fsf@zagadka.ping.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074662888 8823 80.91.224.253 (21 Jan 2004 05:28:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2004 05:28:08 +0000 (UTC) Cc: guile-user@gnu.org, guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 21 06:28:03 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AjAuJ-0005sH-00 for ; Wed, 21 Jan 2004 06:28:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjAtt-0006rC-Qg for guile-devel@m.gmane.org; Wed, 21 Jan 2004 00:27:37 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AjAtJ-0006eJ-7Q for guile-devel@gnu.org; Wed, 21 Jan 2004 00:27:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AjAsa-00063h-Ab for guile-devel@gnu.org; Wed, 21 Jan 2004 00:26:47 -0500 Original-Received: from [130.237.222.202] (helo=smtp.nada.kth.se) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AjAsZ-000634-Ms; Wed, 21 Jan 2004 00:26:15 -0500 Original-Received: from c640 (h148n2fls33o875.telia.com [217.208.54.148]) (authenticated bits=0) by smtp.nada.kth.se (8.12.10/8.12.1) with ESMTP id i0L5QB88011569 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 21 Jan 2004 06:26:12 +0100 (MET) Original-To: Marius Vollmer In-Reply-To: <87smiajeut.fsf@zagadka.ping.de> X-Mailer: Ximian Evolution 1.4.5 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3267 gmane.lisp.guile.user:2674 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2674 On Wed, 2004-01-21 at 01:59, Marius Vollmer wrote: > Roland Orre writes: > > > The reason I have used shared substrings is because of the side > > effects. I was very happy when the make-shared-substring function > > was introduced in 93 or 94. This made it possible for me to make > > tremendous speedups when reading fix length text records and be able > > to immediately treat the different fields of each record with scheme > > standard conversion routines. > > Hmm, maybe should be using a more low-level data type than string for > this kind of raw processing. Did you consider using uniform byte > vectors, either from (srfi srfi-4) or from make-uniform-vector? Just > a thought... Yes I did, but make-shared-arrays on strings doesn't give strings back, so I wouldn't be able to use standard scheme conversion routines anyway. I guess what you refer to is e.g. (make-uniform-vector 10 #\a) which gives a string back. On this I can use make-shared-array which gives a byte vector back. Is there any other type of byte vector I may have missed? (of course the approach above only works on text files, for general fix width format data base files with mixed binary/ascii formats I'm using special routines in C, but most of the files I'm dealing with are text files so I'm often using the shared-substring approach.) /Roland _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel