[PATCH] D27068: Improve string::find

2022-05-09 Thread JianYongChan via Phabricator via cfe-commits
Tangmou added inline comments. Comment at: libcxx/trunk/include/__string:557 + _CharT __f2 = *__first2; + while (true) { +__len1 = __last1 - __first1; Tangmou wrote: > Sorry for the comment after such a long time, but I have a question about > this patch.

[PATCH] D27068: Improve string::find

2022-05-03 Thread JianYongChan via Phabricator via cfe-commits
Tangmou added inline comments. Herald added a project: All. Comment at: libcxx/trunk/include/__string:557 + _CharT __f2 = *__first2; + while (true) { +__len1 = __last1 - __first1; Sorry for the comment after such a long time, but I have a question about thi

[PATCH] D27068: Improve string::find

2017-01-10 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Just for the record, I ported the patch to gcc/libstdc++ as well: PR66414 optimize std::string::find https://github.com/gcc-mirror/gcc/commit/fc7ebc4b8d9ad7e2891b7f72152e8a2b7543cd65 Repository: rL LLVM https://reviews.llvm.org/D27068 __

[PATCH] D27068: Improve string::find

2016-12-30 Thread Sebastian Pop via Phabricator via cfe-commits
sebpop added a comment. In https://reviews.llvm.org/D27068#632685, @EricWF wrote: > Holy crap those improvements are impressive. You're welcome. > This LGTM. I'm assuming @mclow.lists has nothing left to say about this. Thanks for your review and LGTM. I addressed your last comment, added som

[PATCH] D27068: Improve string::find

2016-12-30 Thread Sebastian Pop via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290761: improve performance of string::find (authored by spop). Changed prior to commit: https://reviews.llvm.org/D27068?vs=80134&id=82731#toc Repository: rL LLVM https://reviews.llvm.org/D27068 Fi

[PATCH] D27068: Improve string::find

2016-12-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. Holy crap those improvements are impressive. This LGTM. I'm assuming @mclow.lists has nothing left to say about this. Comment at: libcxx/include/__string:542 +template +_LI

[PATCH] D27068: Improve string::find

2016-12-12 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Ping https://reviews.llvm.org/D27068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27068: Improve string::find

2016-12-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @mclow.lists I'm going to leave this review up to you. I don't see any immediate issues. https://reviews.llvm.org/D27068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D27068: Improve string::find

2016-12-02 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya updated this revision to Diff 80134. hiraditya added a comment. Addressed Marshall's comments. https://reviews.llvm.org/D27068 Files: libcxx/benchmarks/string.bench.cpp libcxx/include/__string Index: libcxx/include/__string

[PATCH] D27068: Improve string::find

2016-12-02 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: libcxx/include/__string:549 +// Stop short when source is smaller than pattern. +ptrdiff_t __len2 = __last2 - __first2; +if (__len2 == 0) mclow.lists wrote: > Is there a reason that you calculate the end po

[PATCH] D27068: Improve string::find

2016-12-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This is starting to look good. Comment at: libcxx/include/__string:549 +// Stop short when source is smaller than pattern. +ptrdiff_t __len2 = __last2 - __first2; +if (__len2 == 0) Is there a reason that you calculate th

[PATCH] D27068: Improve string::find

2016-12-02 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya updated this revision to Diff 80090. hiraditya added a comment. Addressed Tim's comments. https://reviews.llvm.org/D27068 Files: libcxx/benchmarks/string.bench.cpp libcxx/include/__string Index: libcxx/include/__string =

[PATCH] D27068: Improve string::find

2016-12-01 Thread Tim Song via Phabricator via cfe-commits
tcanens added inline comments. Comment at: include/__string:543 +_LIBCPP_CONSTEXPR_AFTER_CXX11 +_RandomAccessIterator +__search_substring(_RandomAccessIterator __first1, _RandomAccessIterator __last1, A character traits class need only accept pointers, so the na

[PATCH] D27068: Improve string::find

2016-12-01 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya updated this revision to Diff 79908. hiraditya added a comment. Updated the benchmark: Without patch: Run on (8 X 3400 MHz CPU s) 2016-12-01 09:20:38 ***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead. Benchmark

[PATCH] D27068: Improve string::find

2016-11-28 Thread Sebastian Pop via Phabricator via cfe-commits
sebpop added a comment. The numbers are from an x86_64-linux machine: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz Overall the patch is a win on the synthetic benchmark. We have also seen this in a proprietary benchmark where it accounted for about 10% speedup. https://reviews.llvm.org/D27068 _

[PATCH] D27068: Improve string::find

2016-11-28 Thread Sebastian Pop via Phabricator via cfe-commits
sebpop added a comment. In https://reviews.llvm.org/D27068#606757, @mclow.lists wrote: > Definitely want to see numbers. master: Benchmark Time CPU Iterations --- BM_StringFindPhase1/10

[PATCH] D27068: Improve string::find

2016-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Definitely want to see numbers. https://reviews.llvm.org/D27068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27068: Improve string::find

2016-11-28 Thread Sebastian Pop via Phabricator via cfe-commits
sebpop added a comment. Please also post the performance numbers from the added benchmarks with and without the change to the lib. Comment at: libcxx/benchmarks/string.bench.cpp:12 +// until the end of s1. +static void BM_StringFindPhase1(benchmark::State& state) { + // Bench

[PATCH] D27068: Improve string::find

2016-11-23 Thread Aditya Kumar via cfe-commits
hiraditya created this revision. hiraditya added reviewers: mclow.lists, EricWF. hiraditya added subscribers: sebpop, cfe-commits. Improving string::find such that it ultimately gets converted to calls to memchr and memcmp. This is an intermediate patch to see if there is an interest in this opti