Martin Wiesner created OPENNLP-1759:
---------------------------------------

             Summary: Optimize computation of hashCode in StringList
                 Key: OPENNLP-1759
                 URL: https://issues.apache.org/jira/browse/OPENNLP-1759
             Project: OpenNLP
          Issue Type: Improvement
    Affects Versions: 2.5.4
            Reporter: Martin Wiesner
            Assignee: Martin Wiesner
             Fix For: 2.5.5, 3.0.0


Right now, StringList#hashCode() computes the hash code in a CPU-intensive way 
each time it is called. When used in NgramModel and Dictionary, this causes 
many extra CPU cycles. Those can be easily avoided, by simply pre-computing the 
hashCode for each StringList object once, that is during objection creation as 
last step.

Let's tune this towards being more eco-friendly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to