8000 CountDistinct/SumDistinct is O(n²) · Issue #50 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

CountDistinct/SumDistinct is O(n²) #50

Closed

Description

@adityamukho

File: executor.rs:800-821

CountDistinct and SumDistinct use Vec.contains for deduplication, which is O(n) per value, resulting in O(n²) total complexity for large groups.

Fix: Use HashSet for deduplication (note: Float complicates Hash impl).

Activity

  1. added a commit that references this issue on Apr 3, 2026
    3948b6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceBenchmark performance regressions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0