This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new extension: boyer-moore search algorithm variants


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]