Mike Rettig created THRIFT-2877: ----------------------------------- Summary: Optimize generated hashCode Key: THRIFT-2877 URL: https://issues.apache.org/jira/browse/THRIFT-2877 Project: Thrift Issue Type: Improvement Components: Java - Compiler Affects Versions: 0.9.3 Reporter: Mike Rettig Priority: Critical
The generated java hashCode method allocates an ArrayList then appends the fields to the list. Primitive fields will be boxed when added to the list. The generated code shouldn't allocate a list or box primitives. The hashCode can be calculated by using a primitive int and some static utility methods which can return the hashCode for each type. -- This message was sent by Atlassian JIRA (v6.3.4#6332)