[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About shared substrings (now working)
From: |
Roland Orre |
Subject: |
Re: About shared substrings (now working) |
Date: |
Wed, 21 Jan 2004 06:21:14 +0100 |
On Wed, 2004-01-21 at 01:59, Marius Vollmer wrote:
> Roland Orre <address@hidden> 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