-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Improve memory usage by refactoring Regex compilation Currently, Regex checking is used in conjunction with iteration. This pattern of coding is frowned upon due to the excessive Regex pattern compilation, causing the program to run slower and consume more memory. By moving the Regex pattern compilation outside of the iteration, and by using `Matcher` objects to check if the strings match the Regex performance, we can potentially remove this performance bottleneck. Let's move to refactor the code and remove such instances of Regex use in iterative loops.
- Loading branch information
1 parent
c2ac8d1
commit 54ba5ec
Showing
2 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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