Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5513

Set - Collection has quadratic complexity

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 4.x
    • groovy-jdk
    • None

    Description

      org.codehaus.groovy.runtime.DefaultGroovyMethods#minus(Set<T> self, Collection<?> removeMe)'s complexity is O(m*n). If you used something like THashSet (http://trove4j.sourceforge.net/javadocs/gnu/trove/set/hash/THashSet.html) you could make it O(m+n) by plugging in a smart hashing strategy. Perhaps you already have something similar in your codebase or dependencies?

      Attachments

        Activity

          People

            Unassigned Unassigned
            gromopetr Peter Gromov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: