You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (Jira)" <ji...@apache.org> on 2021/01/09 01:56:00 UTC

[jira] [Resolved] (IMPALA-6344) Optimize decimal multiplication

     [ 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)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org