[
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588787#comment-14588787
]
Benedict commented on CASSANDRA-9499:
-------------------------------------
I don't mind using sign extension, since that's what I assumed we used in the
first place (and sounds like it's what Sylvain assumed we were using too). We
could also very easily perform zigzag encoding in a method that _depends_ on
{{writePosVInt}}, so no duplication (although we probably won't prevent the VM
inlining it, which it will).
It also has the benefit that implementation is very succinct, so less generated
code. Although I don't think there's a way to write a branchless read, although
we could probably still use getLong(), and efficiently truncate. We would need
the option for a ninth byte, though, and would need to munge the resulting long
quite a bit, so it would just complicate things significantly, probably to
little benefit.
> Introduce writeVInt method to DataOutputStreamPlus
> --------------------------------------------------
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Benedict
> Assignee: Ariel Weisberg
> Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It
> should be possible to make an especially efficient implementation against
> BufferedDataOutputStreamPlus.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)