[Geany-Devel] pull request on GitHub, to add GeanyHighlightSelectedWords, into Geany Plugins

Thomas Martitz kugel at xxxxx
Sat May 30 22:05:00 UTC 2015


Am 30.05.2015 um 03:19 schrieb Matthew Brush:
>
> Just because it's such a trivial search algorithm, using strstr() is 
> much more simple and probably more efficient than using Scintilla's 
> API to find text, but if manual and automatic mode is supported, it 
> would make sense to share the existing code, and that beats out 
> advantage having a redundant (yet simpler/faster) routine to do same, 
> IMO. +1 (if it's not too much hassle to refactor "Mark All").
>

What makes you think naive strstr() based search is faster/more 
efficient than whatever Scintilla does?

I haven't looked actually, but I'd think it does the same (probably 
using C++ strings), or something smarter like KMP mentioned in this 
thread or whatever the C++ template library provides. But I don't think 
it does anything slower than the most trivial strstr() method.

Best regards.


More information about the Devel mailing list