Skip to content

Conversation

@Ray0907
Copy link

@Ray0907 Ray0907 commented Nov 29, 2025

Change Description

  • Replace O(n) list.remove() with O(1) set operations for tracking active indices
  • Use pop() instead of remove() in whitespace merge since prev_result is always last
  • Convert list comprehension to generator expression for short-circuit evaluation
  • Pre-compile regex pattern to avoid repeated compilation

Issue reference

Fixes #XX

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

  - Replace O(n) list.remove() with O(1) set operations for tracking active
  indices
  - Use pop() instead of remove() in whitespace merge since prev_result is
  always last
  - Convert list comprehension to generator expression for short-circuit
  evaluation
  - Pre-compile regex pattern to avoid repeated compilation
@Ray0907
Copy link
Author

Ray0907 commented Nov 29, 2025

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant