[ 
https://issues.apache.org/jira/browse/THRIFT-674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800535#action_12800535
 ] 

Chad Walters commented on THRIFT-674:
-------------------------------------

Looks good to me...

Before your patch:

                        ,   Object create,       Serialize,  /w Same Object,    
 Deserialize, and Check Media,   and Check All,      Total Time, Serialized Size
thrift                  ,       319.39500,      4221.50000,      5169.50000,    
  5644.50000,             NaN,             NaN,     10185.39500,        234
thrift                  ,       330.18000,      4245.00000,      5369.50000,    
  5612.00000,             NaN,             NaN,     10187.18000,        234
thrift                  ,       352.79000,      4237.00000,      6401.00000,    
  5637.50000,             NaN,             NaN,     10227.29000,        234

After your patch:

                        ,   Object create,       Serialize,  /w Same Object,    
 Deserialize, and Check Media,   and Check All,      Total Time, Serialized Size
thrift                  ,       345.85500,      4188.50000,      5246.00000,    
  4993.50000,             NaN,             NaN,      9527.85500,        234
thrift                  ,       323.88000,      4201.50000,      6136.50000,    
  4940.00000,             NaN,             NaN,      9465.38000,        234
thrift                  ,       318.22500,      4209.00000,      6231.50000,    
  4980.00000,             NaN,             NaN,      9507.22500,        234

> Generated read() should just switch directly on field.id
> --------------------------------------------------------
>
>                 Key: THRIFT-674
>                 URL: https://issues.apache.org/jira/browse/THRIFT-674
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java)
>    Affects Versions: 0.2
>            Reporter: Chad Walters
>            Assignee: Bryan Duxbury
>         Attachments: thrift-674.patch
>
>
> THRIFT-623 introduced a performance regression in the Java bindings.
> Instead of mapping field.id to an enum, testing if the enum is null, and then 
> switching on the enum, the switch should just work directly on field.id, with 
> a default case to handle unknown values.
> In some benchmarks I ran, this fix saved 13% on 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