[ https://issues.apache.org/jira/browse/ARROW-3701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16717008#comment-16717008 ]
Pindikura Ravindra commented on ARROW-3701: ------------------------------------------- After running more benchmarks, I found the following for (divide a/b) * The Decimal128 implementation has pretty consistent performance (between 300 to 400ms, for 10M iterations) whereas the i128 division varies widely (between 100ms to 2000ms) based on the value of b i.e the divisor. * when a and b are both large random numbers, i128 divide (both clang and llvm) is twice as fast as the Decimal128 implementation. * when b is a small number (say, 10 or 100), Decimal128 implementation is about 7 times faster. I think the reason is that the Decimal128 implementation has short-cuts for small integers. For decimal operations, there are several cases where we need to do small divisions (to adjust scale). So, I'm using the Decimal128 implementation for divides. > [Gandiva] Add support for decimal operations > -------------------------------------------- > > Key: ARROW-3701 > URL: https://issues.apache.org/jira/browse/ARROW-3701 > Project: Apache Arrow > Issue Type: Task > Components: Gandiva > Reporter: Pindikura Ravindra > Assignee: Pindikura Ravindra > Priority: Major > Labels: pull-request-available > Time Spent: 6h 50m > Remaining Estimate: 0h > > To begin with, will add support for 128-bit decimals. There are two parts : > # llvm_generator needs to understand decimal types (value, precision, scale) > # code decimal operations : add/subtract/multiply/divide/mod/.. > ** This will be c++ code that can be pre-compiled to emit IR code -- This message was sent by Atlassian JIRA (v7.6.3#76005)