[ https://issues.apache.org/jira/browse/IGNITE-5097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033134#comment-16033134 ]
Vladimir Ozerov commented on IGNITE-5097: ----------------------------------------- [~daradurvs], in general fix looks good. Several comments: 1) {{BinaryWriterExImpl}} - arguments passed to {{unsafeEnsure}} must be changed from {{1 + 4}} to {{1 + 5}}, {{doWriteUnsignedVarint}} should have safe and unsafe implementations. Unsafe implementation should be used when {{unsafeEnsure}} is called before method call. Unsafe implementation should use {{out.unsafeWriteByte}} 2) {{BinaryFieldImpl.readField}} - looks like {{DECIMAL}} is read incorrectly here 3) Looks like varint applied to all arrays except of ENUM_ARR. Why? Once fixed, we should ask .NET and CPP experts to port this code to these platforms. > BinaryMarshaller should write ints in "varint" encoding where it makes sense > ---------------------------------------------------------------------------- > > Key: IGNITE-5097 > URL: https://issues.apache.org/jira/browse/IGNITE-5097 > Project: Ignite > Issue Type: Task > Components: general > Affects Versions: 2.0 > Reporter: Vladimir Ozerov > Assignee: Vyacheslav Daradur > Labels: important, performance > Fix For: 2.1 > > > There are a lot of places in the code where we write integers for some > special purposes. Quite often their value will be vary small, so that > applying "varint" format could save a lot of space at the cost of very low > additional CPU overhead. > Specifically: > 1) Array/collection/map lengths > 2) BigDecimal's (usually will save ~6 bytes) > 3) Strings > 4) Enum ordinals -- This message was sent by Atlassian JIRA (v6.3.15#6346)