[ https://issues.apache.org/jira/browse/OPENNLP-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Wiesner resolved OPENNLP-1759. ------------------------------------- Resolution: Fixed Resolved forĀ * main * opennlp-2.x > 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 > Priority: Minor > Fix For: 2.5.5, 3.0.0 > > Time Spent: 20m > Remaining Estimate: 0h > > 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 on first > access - if required. > Let's tune this towards being more eco-friendly. -- This message was sent by Atlassian Jira (v8.20.10#820010)