Generated findByValue() should just switch on value instead of mapping
----------------------------------------------------------------------

                 Key: THRIFT-675
                 URL: https://issues.apache.org/jira/browse/THRIFT-675
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (Java)
    Affects Versions: 0.2
            Reporter: Chad Walters


Generated enum classes currently use a map in findByValue() to go from an 
integer value to an enum.

Instead of using a map, it is faster to simply switch on the value with a 
default case returning null.

On some benchmarks I ran, this saved 7% of deserialization time.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to