Блог пользователя gooo

Автор gooo, история, 9 лет назад, По-английски

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.

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится