-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementPerformance or refactoring improvementPerformance or refactoring improvement
Description
Currently, recursion is used to implement plus on IntervalUnion.
// When `toAdd` only impacts lower or upper, recursively add the new interval to the impacted union. // If neither are impacted, the new interval must lie in between lower and upper.
To determine whether the interval toAdd only impacts the lower or upper interval, IntervalUnionComparison.of() is run for them. This same call will happen at the start of .plus one level down. Would it be worth optimizing this redudant calculation by having an internal overload method for .plus which takes the existing IntervalUnionComparison?
Originally posted by @Whathecode in #42 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementPerformance or refactoring improvementPerformance or refactoring improvement