Marko A. Rodriguez created TINKERPOP-1204:
---------------------------------------------

             Summary: Allow different Map-backings for TraverserSet.
                 Key: TINKERPOP-1204
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1204
             Project: TinkerPop
          Issue Type: Improvement
          Components: process
    Affects Versions: 3.1.1-incubating
            Reporter: Marko A. Rodriguez


I just learned about {{TreeMap}}! We currently have {{LinkedHashMap}} as the 
backing for {{TraverserSet}}. It has to be linked cause {{OrderStep}} needs to 
sort. However, why should we force the {{Map}}-backing.

If you need to maintain order -- {{LinkedHashMap}}.
If you need to on the fly insert order -- {{TreeMap}}.
If you have no ordering requirements -- {{HashMap}}.
If you have a singleton -- {{Collections.singletonMap()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to