[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @ioeric is the author of these completion metrics and evaluation tools. Eric, please feel free to correct me if I got something wrong or missed something. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/ https://reviews.llvm

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Hi Jan, Sure! And sorry for posting these metrics for a while (we had other patches mentioning them) without proper explanation. We simulate a bunch of completions at random points in random files from our internal codebase. We assume the desired completion item

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @ilya-biryukov could you please give details about the quality metric you are using and some description of posted measurements? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/ https://reviews.llvm.org/D59300 _

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356261: [clangd] Tune the fuzzy-matching algorithm (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 190804. ilya-biryukov added a comment. - A better name for the new test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/ https://reviews.llvm.org/D59300 Files: clang-tools-extra/clangd/Fuz

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 190803. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. Address comments: - Shorten the comment to fit it into a single line. - Added a comment about single-case patterns Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/FuzzyMatch.cpp:285 + if (Pat[P] == Word[W] || + (WordRole[W] == Head && (IsPatSingleCase || PatRole[P] == Head))) ++S; ioeric wrote: > ilya-biryukov wrote: > > ioeric wrote: > >

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/FuzzyMatch.cpp:285 + if (Pat[P] == Word[W] || + (WordRole[W] == Head && (IsPatSingleCase || PatRole[P] == Head))) ++S; ilya-biryukov wrote: > ioeric wrote: > > could you explain the int

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. (The result looks great) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/ https://reviews.llvm.org/D59300 ___

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 190796. ilya-biryukov added a comment. - Added comments - Add a test case for 'onmes' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/ https://reviews.llvm.org/D59300 Files: clang-tools-extra/c

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 5 inline comments as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/FuzzyMatch.cpp:74 static bool isAwful(int S) { return S < AwfulScore / 2; } -static constexpr int PerfectBonus = 3; // Perfect per-pattern-char score. +stati

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/FuzzyMatch.cpp:74 static bool isAwful(int S) { return S < AwfulScore / 2; } -static constexpr int PerfectBonus = 3; // Perfect per-pattern-char score. +static constexpr int PerfectBonus = 4; // Perfect per-patter

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Here are the stats for the latest version. We now get a significant bump for initialisms and a much lower hit in non-initialism cases. ==

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 190604. ilya-biryukov added a comment. - Adjust the tweaks, bring back removed heuristics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/ https://reviews.llvm.org/D59300 Files: clang-tools-ex

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Here are some initial measurements with the current metrics that we have. We seem to regress significantly in some cases. This is expected, since we only check the prefix matches there. @ioeric is working on including the non-prefix (more concretely, initialism ma

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I'll collect the metrics and post them here too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59300/new/ https://reviews.llvm.org/D59300 ___ cfe-commits mailing list cfe-

[PATCH] D59300: [clangd] Tune the fuzzy-matching algorithm

2019-03-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. It now gives less preference to prefix matches and does not penalize skipping segments. The motivation is producing better sc