Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
None
Description
Some getOffsetBufferValueCapacity methods uses floating point computation to calculate the capacity, which is not necessary.
(int) ((offsetBuffer.capacity() * 1.0) / OFFSET_WIDTH);
It is interesting to note that JIT cannot optimize away the floating point computations:
So this has performance penalty:
Before:
VariableWidthVectorBenchmarks.getValueCapacity avgt 5 6.570 ± 0.004 ns/op
After:
VariableWidthVectorBenchmarks.getValueCapacity avgt 5 5.787 ± 0.575 ns/op
Attachments
Attachments
Issue Links
- links to