gooo's blog

By gooo, history, 8 years ago, In English

Hi, I'm implementing text editor, text will be stored in multiple chunks of continuous buffers (each of 1k-2k bytes). Obviously, text could change at any time and place.

What algorithms do you suggest (and why) for a) substring search, b) regexp search? I don't have any better idea than apply any of common search algorithms (possibly in parallel for each part of text).

If it helps, query string would be probably much shorter than whole text; most words will occur multiple times in text; text files will be probably smaller than 300k.

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it