You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Micah Kornfield (JIRA)" <ji...@apache.org> on 2019/06/20 06:45:00 UTC
[jira] [Resolved] (ARROW-5639) [Java] Remove floating point
computation from getOffsetBufferValueCapacity
[ https://issues.apache.org/jira/browse/ARROW-5639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Micah Kornfield resolved ARROW-5639.
------------------------------------
Resolution: Fixed
Fix Version/s: 0.14.0
Issue resolved by pull request 4602
[https://github.com/apache/arrow/pull/4602]
> [Java] Remove floating point computation from getOffsetBufferValueCapacity
> --------------------------------------------------------------------------
>
> Key: ARROW-5639
> URL: https://issues.apache.org/jira/browse/ARROW-5639
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Java
> Reporter: Liya Fan
> Assignee: Liya Fan
> Priority: Trivial
> Labels: pull-request-available
> Fix For: 0.14.0
>
> Attachments: image-2019-06-18-20-30-17-826.png
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> 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:
> !image-2019-06-18-20-30-17-826.png!
> 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
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)