ruff/crates/ruff_python_ast
Charlie Marsh 4782675bf9
Remove lexer-based comment range detection (#5785)
## Summary

I'm doing some unrelated profiling, and I noticed that this method is
actually measurable on the CPython benchmark -- it's > 1% of execution
time. We don't need to lex here, we already know the ranges of all
comments, so we can just do a simple binary search for overlap, which
brings the method down to 0%.

## Test Plan

`cargo test`
2023-07-16 01:03:27 +00:00
..
src Remove lexer-based comment range detection (#5785) 2023-07-16 01:03:27 +00:00
Cargo.toml Use consistent Cargo.toml metadata in all crates (#5015) 2023-06-12 00:02:40 +00:00