User-949571684 posted
Hello, cyclomatic complexity measures the number of logic branches in a method. Keeping cyclomatic complexity low helps produce code that is more structured and object-oriented. I've worked with some people in the past who did not know what cyclomatic
complexity was and did not have a very good understanding of object-oriented design. They argued that putting all of the code in a single method provided better performance.
I'm guessing that there may be some performance impact although I'm guessing that the impact is very minimal/insignificant. I wanted to present a typical standout scenario and get your feedback about the estimated performance impact from refactoring. Consider
a method with a cyclomatic complexity of 50. This method could be refactored into 10 separate methods, each with a cyclomatic complexity of 5 or less. Assume that any methods called in a loop won't be called more than 10 times/each.
Given this scenario, how much performance impact would you expect when refactored? My first impression is that performance would be impacted less than .1s but this only a guess. Based on your experience, past performance testing, etc, how much performance
impact would you expect in this refactoring scenario?