[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #4288] grep -i: Use of faster Boyer-Moore instead of commentz-wal
From: |
Johannes T. Prinz |
Subject: |
[patch #4288] grep -i: Use of faster Boyer-Moore instead of commentz-walter algorithm for single key word |
Date: |
Tue, 9 Aug 2005 10:23:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 |
URL:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=4288>
Summary: grep -i: Use of faster Boyer-Moore instead of
commentz-walter algorithm for single key word
Project: grep
Submitted by: purple
Submitted on: Tue 08/09/05 at 10:23
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
_______________________________________________________
Details:
In case of of a single key word combined with an ignore-case match grep uses
the commentz-walter algorithm.
The patch modifies the faster Boyer-Moore algo so that it can and will be
used instead. For a single character string still commentz-walter is used
since bmexec() then uses memchr(), something that will not do with a trans
table.
In case of multibyte strings available a modification of bmexec() would not
be necessary: All characters are normalized to lower case in search.c anyway.
But for the sake of generality and the "mind your own business"-philosophy the
change to kwset.c are necessary.
Something to be considered for the future:
Should a normalization still take place in search.c (each character has to be
modified!)? Or should the trans-table be used (will that always work with
multibyte strings?)?
_______________________________________________________
Carbon-Copy List:
CC Address | Comment
------------------------------------+-----------------------------
address@hidden |
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 08/09/05 at 10:23 Name: kwset.diff Size: 750B By: purple
<http://savannah.gnu.org/patch/download.php?item_id=4288&item_file_id=4992>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=4288>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [patch #4288] grep -i: Use of faster Boyer-Moore instead of commentz-walter algorithm for single key word,
Johannes T. Prinz <=