[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589026#comment-14589026
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
-------------------------------------------

I pushed an implementation based on the protocol buffers varint scheme. If you 
have ideas for what an efficient implementation would look like let me know.

On the read side it would be faster if I did the 10-bytes with padding thing. 
Maybe then copy to a byte array to avoid pulling a byte out of ByteBuffer? 
Using a long seems tricky since it can be up to 10 bytes.

Could do the same thing on the serialization side so that we only go into 
ByteBuffer. I will have to get the size of the encoded integer to figure out 
how much space I will need first.

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

Reply via email to