guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string-map arg order


From: Marius Vollmer
Subject: Re: string-map arg order
Date: 06 Sep 2001 22:16:08 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Dirk Herrmann <address@hidden> writes:

> On 6 Sep 2001, Marius Vollmer wrote:
> 
> > I wouldn't mind if string-ref and string-set! would take large
> > performance hits but we would have an alterntive, more functional and
> > list-like interface to strings as a replacement.  I'd say that
> > scanning (with substrings as a result) and concatenation are useful
> > operations that can be fast for variable-width encodings and can
> > probably substitute for string-ref and string-set.
> 
> Not if you still allow for calls to string-set!.  Look at the example
> below, which I copied from my latest mail to Alex:

Yes, the idea is that the overhead is only actually incurred when
`string-set!' is used.  As long as you don't use it, `string-for-each'
would be O(n).

Implementing this is likely tricky...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]