[ 
https://issues.apache.org/jira/browse/HIVE-10179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14681508#comment-14681508
 ] 

Teddy Choi commented on HIVE-10179:
-----------------------------------

Hello [~chengxiang li].

I found there is more room for SIMD optimization. Followings are just some 
examples.

|| File || Before || After ||
| NotCol.java | {{~vector\[i\] & 1}} | {{vector\[i\] ^ 1}} |
| ColAndCol.java | {{vector1\[i\] & vector2\[0\]}} | {{vector1\[i\] & 
vector2Value}} |
| ColOrCol.java | {{vector1\[i\] \| vector2\[0\]}} | {{vector1\[i\] \| 
vector2Value}} |
| ColumnCompareColumn.txt | {{vector1\[i\] < vector2\[i\] ? 1 : 0}} | 
{{(vector1\[i\] - vector2\[i\]) & Long.MIN_VALUE}} |
| IfExprColumnColumn.txt | {{outputVector\[i\] = (vector1\[i\] == 1 ? 
vector2\[i\] : vector3\[i\])}} | {{outputVector\[i\] = (~(vector1\[i\] - 1) & 
vector2\[i\]) \| ((vector1\[i\] - 1) & vector3\[i\])}} |
| IfExprColumnScalar.txt | {{outputVector\[i\] = (vector1\[i\] == 1 ? 
arg2Scalar : vector3\[i\])}} | {{outputVector\[i\] = (~(vector1\[i\] - 1) & 
argScalar2) \| ((vector1\[i\] - 1) & vector3\[i\])}} |

Most of them are quite simple. May I make and start corresponding issues?

Sincerely yours,
Teddy Choi

> Optimization for SIMD instructions in Hive
> ------------------------------------------
>
>                 Key: HIVE-10179
>                 URL: https://issues.apache.org/jira/browse/HIVE-10179
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chengxiang Li
>            Assignee: Chengxiang Li
>              Labels: optimization
>
> [SIMD|http://en.wikipedia.org/wiki/SIMD] instuctions could be found in most 
> of current CPUs, such as Intel's SSE2, SSE3, SSE4.x, AVX and AVX2, and it 
> would help Hive to outperform if we can vectorize the mathematical 
> manipulation part of Hive. This umbrella JIRA may contains but not limited to 
> the subtasks like:
> # Code schema adaption, current JVM is quite strictly on the code schema 
> which could be transformed into SIMD instructions during execution. 
> # New implementation of mathematical manipulation part of Hive which designed 
> to be optimized for SIMD instructions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to