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


> > 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 ;-)

;)

Just going for clarity here....

> > 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.

See the followups to this. 

> > Can you add in the testsuite additions?
> 
> Yes, one niggling question though. I need to add a data file too.
> Where should that go?

Sure.

That should go in:
gcc/libstdc++-v3/testsuite/data/

> 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.

Ok.

The regression tests should go in:
gcc/libstdc++-v3/testsuite/ext
(or maybe a subdirectory if there are more than one)

And the performance tests should go in:

gcc/libstdc++-v3/testsuite/performance/ext
(same subdir thing)

best,
benjamin


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