This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: new extension: boyer-moore search algorithm variants
- From: "Dhruv Matani" <dhruvbird at gmail dot com>
- To: "Benjamin Kosnik" <bkoz at redhat dot com>
- Cc: pcarlini at suse dot de, libstdc++ at gcc dot gnu dot org
- Date: Wed, 22 Nov 2006 12:52:57 +0530
- Subject: Re: new extension: boyer-moore search algorithm variants
- References: <20061121193232.5328d344.bkoz@redhat.com>
On 11/22/06, Benjamin Kosnik <bkoz@redhat.com> wrote:
Hey Dhruv.
I have two questions about this patch.
1) struct __bm_struct.
Boo. Bad name. How about __boyer_moore_base? Other ideas?
Yes, sure thing, maybe vm_area_struct has had it's toll on me ;-)
2) Why __is_one_byte and not moving __is_char from
ext/cpp_type_traits.h and correcting it for signed/unsigned....
As already mentioned by Paolo, we need the type to be a one byte type,
because we are using table lookup of 256(actually 384) entries, which
happens to be the domain of POD+one byte types. And this table is
indexed by the character's ASCII value. This special use case is a
peculiarity of the algorithm under question.
?
Can you add in the testsuite additions?
Yes, one niggling question though. I need to add a data file too.
Where should that go?
Plus, there should be two separate cases. One that checks the return
value of boyer moore against std::search() for regressions, and one
that checks for performance.
Regards,
-Dhruv.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
"Be sure brain is in gear before engaging mouth"
-- Anonymous