ExpanderHelper optimize arbitrary interval
Brought to you by:
vektor330
When method applyInterval() receives an interval of {0,1000} - it should be practically considered a Kleene star, depending on INFINITY constant. Therefore, it is not necessary to clone the list 1000 times, just INFINITY times (currently INFINITY = 3). This would be a possible major speed-up.
Another case is when interval {100,200} is received as parameter. In this case, both limits are > INFINITY. Ideally, the values should be preserved, but doing it by expansion is nonsense. Therefore, expected result can be something like an unbounded interval with minimum of 3 (or the INFINITY constant).
change value of 30 to 1000 and see the delay