Multiple search of a substring in a string

Yeah, I think my brain is a little off today, because you're right, that is the 4th position, and my initial example is also wrong. At least my first, overlapped search block is correct.

the 1st one is a litle bit faster (3-4 ms hahaha)

yes the 1st one is ok

can you make this block with map? (bh request)

see you tomorrow guys!

thank's a lot

Here's a fixed version.



:rofl:

ok sure

done:
untitled script pic(32)


looks complicated but extremely simple - took me less than 10 minutes to make

(also, anyone know if [flatten V] of @list or append input list: (stuff) is faster? because you can substitute the outer flatten block w/ an append input list)

I forgot how "let" is detrimental to the performance ([ms] for one iteration)


Fast version "# let"

List based implementation (total [ms]; but simplicity of the recursive version has hone)

Will you settle for KEEP? (The result list is smaller than the number of candidate strings.)

Not promising anything about the speed, although I think it should be faster working with lists of letters than working with strings.

why would that be a problem?

For the same reason you used KEEP! :~)

what did it do? was it slow?

Does "it" mean your version or mine? I didn't time mine; I just arrogantly posted it, leaving it to y'all to do timing comparisons. :~)

mine, but why would keep cause problems?

It doesn't. @loucheman asked for a solution using MAP, and I didn't use MAP, that's all.

But, oops, when I made LENGTH (the variable) be length(small)-1 I forgot to take advantage of that in the initial selection of index values to try:

oh nice, this solution is really good. but is declaring vars faster than call w/ inputs [] [] @delInput @addInput :: control reporter ?

I have no idea. Sorry...

oh. ok I will figure out which is better