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