You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚡️ Speed up function get_diff_lines_count by 12% in PR #274 (skip-formatting-for-large-diffs)
Here’s a more optimized version of your program.
**Optimization rationale:**
- Eliminated the nested function, reducing overhead.
- Avoided creating an intermediate list, directly counting matching lines.
- Used string indexing instead of `startswith()` for single-char checks for slightly less overhead.
- Preserved all relevant comments (there were none to preserve).
0 commit comments