Skip to content

Optimize duplicate checking #154

@acgetchell

Description

@acgetchell

src/core/triangulation.rs
1013-1045: Acknowledge O(n²·D) duplicate checking—consider optimization strategy.

The duplicate coordinate check is O(n) per insertion, leading to O(n²·D) construction cost.

Evaluate a keyed/quantized coordinate index for optimization.

Current impact: For moderate triangulations (~1,000 vertices), the overhead is manageable. For larger triangulations (>10,000 vertices), this could become a bottleneck.

Recommendation: Track this as a known performance limitation. If users report slow construction times, implement a spatial hash or grid-based duplicate check as suggested in the comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance related issuesquestionFurther information is requestedrustPull requests that update rust code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions