[Lldb-commits] [PATCH] D31451: New C++ function name parsing logic

Eugene Zemtsov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 31 12:57:28 PDT 2017


eugene added a subscriber: labath.
eugene marked 2 inline comments as done.
eugene added a comment.

In https://reviews.llvm.org/D31451#715649, @tberghammer wrote:

> Because of this I think some targeted micro benchmark will be much more useful to measure the performance of this code then an end-to-end test as an e2e test would have low signal to noise ratio.


I did some micro-benchmarking and on average new parser is ~3 time slower than the old one. (new parser - ~200k string/s, old parser - ~700k string/s) 
clang::Lexer appears to be the slowest part of it. 
I mitigate this performance loss, by calling simplified parsing code for simple cases and calling new parser only when the old one fails.



================
Comment at: source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp:18
+using namespace lldb_private;
+using llvm::Optional;
+using llvm::None;
----------------
labath wrote:
> Are these necessary? You seem to prefix every occurence of Optional and None anyway...
Well, I used None. Now I use Optional as well.


https://reviews.llvm.org/D31451





More information about the lldb-commits mailing list