[utils][filecheck-lint]: speedup filecheck_lint#94191
Conversation
|
✅ With the latest revision this PR passed the Python code formatter. |
01bd171 to
1a50a69
Compare
|
cc @bchetioui Actually, faster way is to use some external package to do fast levenshtein, like jellyfish (which speedup check to few seconds), but this is for separate commit. |
There was a problem hiding this comment.
Would you mind deriving your string here (and below) using the previous start_column and end_column logic?
These explain the expected behaviour better, imo.
There was a problem hiding this comment.
Can you describe what you mean?
There was a problem hiding this comment.
Sorry---I was not clear. I meant to ask whether 7 could be assigned from len("junk// ") + 1 and 11 could be assigned from len(lines[1]) - 1.
I think this makes the expected behaviour clearer.
There was a problem hiding this comment.
This looks like copypaste and not maintainable - change in input lines only will break tests without fixes here too.
Maybe add comment like:
junk; CHCK1:
| |
| column 11
column 7
There was a problem hiding this comment.
This looks like copypaste and not maintainable - change in input lines only will break tests without fixes here too.
The same tests will break in both cases.
Maybe add comment like:
Adding a comment here is strictly worse; that too will get out of sync, but will do so completely silently since the comment doesn't get executed.
Anyway, this is not a huge deal, and you seem to feel strongly about this, so let's keep it as is.
That's a good point---there are certainly faster implementations of Levenshtein out there, but I don't think we'll want to add any non-standard third party dependency here. (Which is the reason we implemented a custom one here, even.) If you find one that we can use under these conditions, that'd be awesome! |
1a50a69 to
32484a4
Compare
32484a4 to
fef05e9
Compare
For example:
clang\test\OpenMP\task_codegen.cpp: 0m29.570s -> 0m0.159s
clang\test\Driver: 4m55.917s -> 1m48.053s
Most win from big files.