This repository was archived by the owner on Jun 18, 2026. It is now read-only.
refactor: replace List map keys with String in NetworkFlowAnalyzer - #113
Closed
sauravbhattacharya001 wants to merge 1 commit into
Closed
sauravbhattacharya001 wants to merge 1 commit into
sauravbhattacharya001 wants to merge 1 commit into
Conversation
…lyzer NetworkFlowAnalyzer used Arrays.asList(from, to) as HashMap keys for residual capacities, flow values, and edge lookups. Every directedKey() call allocated a new List object, and every HashMap lookup had to hash the list contents. Replaced with simple 'from->to' String keys via string concatenation. This eliminates per-lookup object allocation and gives faster hashing (String.hashCode is cached after first call). Also removes the now-unused Arrays import.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Owner
Author
|
Closing: superseded or conflicting with newer changes already on main/master. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace Arrays.asList(from, to) HashMap keys with simple "from->to" String keys in NetworkFlowAnalyzer.
Eliminates per-lookup List allocation and gives faster hashing (String.hashCode is cached). Zero behavioral change.