By default, code in PBJ always passes false for the zigZag flag when writing and parsing varint values. And the current varint parsing code has an extra conditional expression when returning a value to decide if the parsed value should be "unZigZag'd".
Need to benchmark a version of the varint parser w/o the zigZag condition, and if the performance boost is noticeable, then introduce a read/getVarIntNoZigZag() versions of methods so that by default we go through the fastest path possible, with the minimum number of conditional operations.
By default, code in PBJ always passes
falsefor thezigZagflag when writing and parsing varint values. And the current varint parsing code has an extra conditional expression when returning a value to decide if the parsed value should be "unZigZag'd".Need to benchmark a version of the varint parser w/o the zigZag condition, and if the performance boost is noticeable, then introduce a
read/getVarIntNoZigZag()versions of methods so that by default we go through the fastest path possible, with the minimum number of conditional operations.