You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by chengxiang li <ch...@intel.com> on 2015/04/07 07:46:30 UTC
Review Request 32918: HIVE-10180 Loop optimization for SIMD in
ColumnArithmeticColumn.txt
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32918/
-----------------------------------------------------------
Review request for hive.
Bugs: Hive-10180
https://issues.apache.org/jira/browse/Hive-10180
Repository: hive
Description
-------
JVM is quite strict on the code schema which may executed with SIMD instructions, take a loop in DoubleColAddDoubleColumn.java for example,
for (int i = 0; i != n; i++) {
outputVector[i] = vector1[0] + vector2[i];
}
The "vector1[0]" reference would prevent JVM to execute this part of code with vectorized instructions, we need to assign the "vector1[0]" to a variable outside of loop, and use that variable in loop.
Diffs
-----
trunk/ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticColumn.txt 1671736
Diff: https://reviews.apache.org/r/32918/diff/
Testing
-------
Thanks,
chengxiang li
Re: Review Request 32918: HIVE-10180 Loop optimization for SIMD in
ColumnArithmeticColumn.txt
Posted by chengxiang li <ch...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32918/
-----------------------------------------------------------
(Updated 四月 7, 2015, 7:24 a.m.)
Review request for hive.
Changes
-------
mark variables as final.
Bugs: Hive-10180
https://issues.apache.org/jira/browse/Hive-10180
Repository: hive
Description
-------
JVM is quite strict on the code schema which may executed with SIMD instructions, take a loop in DoubleColAddDoubleColumn.java for example,
for (int i = 0; i != n; i++) {
outputVector[i] = vector1[0] + vector2[i];
}
The "vector1[0]" reference would prevent JVM to execute this part of code with vectorized instructions, we need to assign the "vector1[0]" to a variable outside of loop, and use that variable in loop.
Diffs (updated)
-----
trunk/ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticColumn.txt 1671736
Diff: https://reviews.apache.org/r/32918/diff/
Testing
-------
Thanks,
chengxiang li
Re: Review Request 32918: HIVE-10180 Loop optimization for SIMD in
ColumnArithmeticColumn.txt
Posted by Gopal V <go...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32918/#review79126
-----------------------------------------------------------
Ship it!
Minor comments about final vars, to make it clearer to read.
trunk/ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticColumn.txt
<https://reviews.apache.org/r/32918/#comment128251>
For the sake clarity, can you mark these as final variables?
trunk/ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticColumn.txt
<https://reviews.apache.org/r/32918/#comment128252>
Final vars for the other case
- Gopal V
On April 7, 2015, 5:46 a.m., chengxiang li wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32918/
> -----------------------------------------------------------
>
> (Updated April 7, 2015, 5:46 a.m.)
>
>
> Review request for hive.
>
>
> Bugs: Hive-10180
> https://issues.apache.org/jira/browse/Hive-10180
>
>
> Repository: hive
>
>
> Description
> -------
>
> JVM is quite strict on the code schema which may executed with SIMD instructions, take a loop in DoubleColAddDoubleColumn.java for example,
> for (int i = 0; i != n; i++) {
> outputVector[i] = vector1[0] + vector2[i];
> }
> The "vector1[0]" reference would prevent JVM to execute this part of code with vectorized instructions, we need to assign the "vector1[0]" to a variable outside of loop, and use that variable in loop.
>
>
> Diffs
> -----
>
> trunk/ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticColumn.txt 1671736
>
> Diff: https://reviews.apache.org/r/32918/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> chengxiang li
>
>