[
https://issues.apache.org/jira/browse/THRIFT-754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853277#action_12853277
]
Bryan Duxbury commented on THRIFT-754:
--------------------------------------
It's a worthwhile point. Up to this point, I think Thrift in general has been
assuming that the data is good in all cases. I could change it to a for loop,
but I'm not sure what performance impact that would have.
> Improvements to varint reading in Compact Protocol
> --------------------------------------------------
>
> Key: THRIFT-754
> URL: https://issues.apache.org/jira/browse/THRIFT-754
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Java)
> Affects Versions: 0.3
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.3
>
> Attachments: thrift-754.patch
>
>
> I've found a way to make better use of direct buffer access in the Compact
> Protocol that makes reading varints faster. When there's at least 5 or 10
> bytes available in the buffer, we can try to do the whole varint
> deserialization from the buffer rather than byte by byte, and ultimately only
> consume the bytes we used. This lets us avoid the cost of going back and
> forth from the buffer 1-10 times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.