Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite findTargets for better performance. #11754

Merged
merged 2 commits into from
Jul 10, 2023

Commits on Jul 10, 2023

  1. Rewrite findTargets for better performance.

    - Avoids O(n^2) destroyer checks.
    - Avoids an expensive removeAll() call.
    - Uses a single stream filter to process, removing an unnecessary intermediate collection in the common case when no destroyers are present.
    
    Note: This was showing up in performance profiles.
    asvitkine committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    6608d25 View commit details
    Browse the repository at this point in the history
  2. Better variable name.

    asvitkine committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    32f265c View commit details
    Browse the repository at this point in the history