Nicolas Desprès wrote:
> On Mon, Jul 29, 2013 at 12:57 PM, Stephen Kelly
> <[email protected]> wrote:
>
>> Nicolas Desprès wrote:
>> > It was fastest because it was not doing the right thing. I tried to
>> > patch it properly and the benchmark are the same whether we use the
>> > default comparison functor or mine.
>> >
>> > So I think you can merge it like that. I have pushed a new version
>> without
>> > the comment.
>> >
>>
>> I still haven't tried it, but there are still style issues.
>
>
>> * Don't put an else after a return
>> * Wrap single line blocks in {}
>>
>
> Fixed and force-pushed. Sorry for the inconvenience. I am not used to this
> style yet.
Your Compare::operator() contains this:
if (j == s2.rend())
{
return false;
}
return false;
Any reason not to simplify that?
Also, I don't see why the custom comparison functor is needed at all. I
removed it and sped up the test significantly. Can you explain?
Thanks,
Steve.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers