rpuch commented on code in PR #4562: URL: https://github.com/apache/ignite-3/pull/4562#discussion_r1802798403
########## modules/core/src/main/java/org/apache/ignite/internal/util/io/NaiveVarInts.java: ########## @@ -20,12 +20,17 @@ import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; +import org.apache.ignite.internal.util.VarIntUtils; /** - * Utils to read/write variable length ints. + * Utils to read/write naive variable length ints. + * + * <p>The 'naivety' relates to a simple algorithm. The naive varints produce more compact results than the 'general purpose' varints + * (see {@link VarIntUtils}) when the input integer is approximately between 127 and 254, so they seem to be more appropriate + * for small values (like lengths of short strings and collections). */ -public class VarInts { - private VarInts() { +public class NaiveVarInts { Review Comment: After a bit of thinking, I realized that the advantage that `NaiveVarInts` provide is so tiny that it does not justify the complexity of having 2 implementations. I switched to usual varints and added a TODO to remove `NaiveVarInts` altogether (it will require more actions than just removing the class, so it's better to do it in a separate PR). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org