[ https://issues.apache.org/jira/browse/IMPALA-6344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Armstrong resolved IMPALA-6344. ----------------------------------- Resolution: Later > Optimize decimal multiplication > ------------------------------- > > Key: IMPALA-6344 > URL: https://issues.apache.org/jira/browse/IMPALA-6344 > Project: IMPALA > Issue Type: Improvement > Components: Backend > Reporter: Taras Bobrovytsky > Priority: Major > Labels: decimal, perf > > Our current implementation of decimal multiplication can be slow and > non-optimal due to having branches in our code. > [~zamsden] suggested to use > [https://en.wikipedia.org/wiki/Karatsuba_algorithm] multiplication for int128 > * int128 -> int256 multiply. The following example implements this and uses 3 > hardware 64-bit multiplies to get a full 256 bit result. The code is written > in inline assembly and has no branches. > http://coliru.stacked-crooked.com/a/25a697389211189f > We should consider benchmarking this code and using this approach if it turns > out to be faster. -- This message was sent by Atlassian Jira (v8.3.4#803005)