Search algorithm for text editor

Правка en1, от gooo, 2016-05-18 22:58:47

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.

Теги search, text, editor

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский gooo 2016-05-18 22:58:47 585 Initial revision (published)