Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#985 closed patch (fixed)

Replace sort to min_element in SubgraphDepthLocater::getDepth

Reported by: dkvash Owned by: dbaston
Priority: trivial Milestone:
Component: Default Version: master
Severity: Idea Keywords: SubgraphDepthLocater
Cc:

Description

SubgraphDepthLocater::getDepth uses heavy std::sort to find minimum DepthSegment?, this patch replaces sort to a more appropriate std::min_element.

Origin implementation also relies on a Collections.min instead of heavy sort. https://github.com/locationtech/jts/blob/jts-1.16.1/modules/core/src/main/java/org/locationtech/jts/operation/buffer/SubgraphDepthLocater.java#L53

Attachments (1)

Substitute_std__sort_to_std__min_element.patch (730 bytes) - added by dkvash 2 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 2 months ago by dkvash

Priority: majortrivial
Severity: UnassignedIdea

comment:2 Changed 2 months ago by dbaston

Owner: changed from geos-devel@… to dbaston

comment:3 Changed 2 months ago by Daniel Baston <dbaston@…>

Resolution: fixed
Status: newclosed

In bd66c5a/git:

Avoid unnecessary sort in SubgraphDepthLocater?

Patch by dkvash
Fixes #985

comment:4 Changed 2 months ago by dbaston

Thanks!

Note: See TracTickets for help on using tickets.