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.
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
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
__
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
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
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
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
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/
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
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
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
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
=
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
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
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
_
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
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
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
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
19 matches
Mail list logo