[ 
https://issues.apache.org/jira/browse/THRIFT-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Duxbury updated THRIFT-188:
---------------------------------

    Attachment: thrift-188.patch

I don't have an abstract benchmark for this yet. but it appears to have dropped 
the time spent in Thrift struct constructors for me by 40%. It's a pretty 
simple patch, too. 

> Improve Ruby struct constructor speed
> -------------------------------------
>
>                 Key: THRIFT-188
>                 URL: https://issues.apache.org/jira/browse/THRIFT-188
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>         Attachments: thrift-188.patch
>
>
> For cases when you have no default values for your fields, you still end up 
> paying some cost to check if there are default values. It turns out that it 
> costs about half as much to check if a Ruby hash is empty as it does to 
> iterate an empty hash, probably because of the block allocation. 

-- 
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