soywiz-archive/korma

Optimize IntSegmentSet setToIntersection

Closed this issue · 1 comments

https://github.com/korlibs/korma/blob/master/korma/src/commonMain/kotlin/com/soywiz/korma/segment/IntSegmentSet.kt#L160

Check the number of segments of the two sets and make the outer iteration to use the set with less elements.

This operation is used for clipping.

Fixed in #25