[ https://issues.apache.org/jira/browse/HIVE-11533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14947998#comment-14947998 ]
Chengxiang Li commented on HIVE-11533: -------------------------------------- Very nice job, the patch looks good, just one thing to remind. I guess the performance data is tested with "selectedInUse" is false. while "selectedInUse" is true, it could not benefit from SIMD instructions, during my previous experience, it might downgrade performance sometimes after the optimization, have you verified that? > Loop optimization for SIMD in integer comparisons > ------------------------------------------------- > > Key: HIVE-11533 > URL: https://issues.apache.org/jira/browse/HIVE-11533 > Project: Hive > Issue Type: Sub-task > Components: Vectorization > Reporter: Teddy Choi > Assignee: Teddy Choi > Priority: Minor > Attachments: HIVE-11533.1.patch, HIVE-11533.2.patch, > HIVE-11533.3.patch, HIVE-11533.4.patch > > > Long*CompareLong* classes can be optimized with subtraction and bitwise > operators for better SIMD optimization. > {code} > for(int i = 0; i != n; i++) { > outputVector[i] = vector1[0] > vector2[i] ? 1 : 0; > } > {code} > This issue will cover following classes; > - LongColEqualLongColumn > - LongColNotEqualLongColumn > - LongColGreaterLongColumn > - LongColGreaterEqualLongColumn > - LongColLessLongColumn > - LongColLessEqualLongColumn > - LongScalarEqualLongColumn > - LongScalarNotEqualLongColumn > - LongScalarGreaterLongColumn > - LongScalarGreaterEqualLongColumn > - LongScalarLessLongColumn > - LongScalarLessEqualLongColumn > - LongColEqualLongScalar > - LongColNotEqualLongScalar > - LongColGreaterLongScalar > - LongColGreaterEqualLongScalar > - LongColLessLongScalar > - LongColLessEqualLongScalar -- This message was sent by Atlassian JIRA (v6.3.4#6332)