cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus
Date Tue, 16 Jun 2015 21:15:01 GMT


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

View raw message