[ https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588343#comment-14588343 ]
Benedict commented on CASSANDRA-9499: ------------------------------------- When I said little endian, it was a typo. Typically we use big endian, so we want any method to assume this. I hadn't noticed that they chose to implement it was, effectively, little endian encoding. Which is another reason to switch: it's confusing to swap between different types of encoding, and breaks assumptions. However, if we wanted to implement this optimisation for the current encoding scheme, we would just modify if to a shift left instead of an &, followed by a Long.reverseBytes() (nb: admittedly without thinking about it too rigorously) That said, it is a shame we didn't standardise on little endian, given our main target platform is little endian. I know Java defaults to big endian, but the target platform is more important. That's a much scarier change than modifying this, though, so let's not go there. Probably ever. > 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)