guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)


From: Linus Björnstam
Subject: Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)
Date: Mon, 06 Jan 2020 10:08:28 +0100
User-agent: Cyrus-JMAP/3.1.7-731-g1812a7f-fmstable-20200106v2

Did you try it with a "better" string-contains? IIRC the guile one is a naive 
string search (but in C) which could maybe be better if it was implemented as, 
say, a KMP search. The reference srfi-13 has one you could try. That could be 
faster for longer strings and longer patterns. 

If that is faster, I can port a constant-space one that I have in ocaml 
somewhere in the catacombs of my.computer.

-- 
  Linus Björnstam

On Fri, 20 Dec 2019, at 18:32, lloda wrote:
> 
> This patch adds string-replace-substring that wingo posted to the 
> mailing list to (ice-9 strings). This is a commonly used function and a 
> good implementation isn't trivial, so I think it deserves inclusion.
> 
> 
> 
> Attachments:
> * 0001-Add-string-replace-substring-to-ice-9-string-fun.patch



reply via email to

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