Skip to content

Commit

Permalink
Speed up search by 85+%
Browse files Browse the repository at this point in the history
Large searches spend most of their time in converting the current line
for output. For most lines which do not match we do not need to
convert, so this patch skips that.

This patch does the following optimizations:

- Only convert when there is an actual match, or the line
contains backspaces (for backspace conversion)
- Don't do the full conversion for case independent searches, but
ask the low level search functions to be case independent instead
- Use the more optimized strstr/strcasestr functions in glibc for the
actual searching in the no regular expression case

Also regenerate the configure file to check for strcasestr.
  • Loading branch information
Andi Kleen committed Sep 20, 2014
1 parent 6852ab4 commit 6dd0620
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 143 deletions.
Loading

0 comments on commit 6dd0620

Please sign in to comment.