Visitar URL original
Performance Issue with Overlaps · Issue #36 · robert-bor/aho-corasick · GitHub
Skip to content

Performance Issue with Overlaps #36

Closed

Description

@almondtools

I encountered a performance problem, documented in a Unit-Test https://github.com/almondtools/stringbench/blob/master/src/test/java/com/almondtools/stringbench/incubation/ACAhoCorasickIncubationTest.java.

I tracked down the reason: The removeOverlaps-Method removes overlaps in an inefficient way. The experiments show, that following section is the critical one:

for (Intervalable removeInterval : removeIntervals) {
   intervals.remove(removeInterval);
 }

Doing this on an ArrayList consumens O(n^2) and an ArrayList containing millons of elements will have long to work.

Activity

  1. ghost closed this as completedon Nov 30, 2016
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions