RemHero opened a new issue, #39365:
URL: https://github.com/apache/arrow/issues/39365

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   I read the user docs, and use the API in the "compute function" and have 
implemented an expression 
`(u1.d1.s1*u1.d2.s4+u1.d2.s4/u1.d1.s1)/u1.d1.s1*u1.d2.s4`. I found that using 
Arrow didn't make it faster. I made sure that 
`arrow::GetRuntimeInfo().detected_simd_level = AVX2`, and I wrote the same 
row-based expression that had much faster computation speed than using Arrow. I 
don't know how to correctly use Arrow's computation interface. 
   Here is my code.
   ```c
       std::shared_ptr<arrow::Array> columnInt = record_batch->column(1);
       std::shared_ptr<arrow::Array> columnDouble = record_batch->column(3);
       arrow::Datum multiply_datum, divide_datum, add_datum, divide_datum1, 
multiply_datum1;
   
       ARROW_ASSIGN_OR_RAISE(multiply_datum,
                             arrow::compute::Multiply(columnInt, columnDouble));
       ARROW_ASSIGN_OR_RAISE(divide_datum,
                             arrow::compute::Divide(columnDouble, columnInt));
       ARROW_ASSIGN_OR_RAISE(add_datum,
                             arrow::compute::Add(multiply_datum, divide_datum));
       ARROW_ASSIGN_OR_RAISE(divide_datum1,
                             arrow::compute::Divide(add_datum, columnInt));
       ARROW_ASSIGN_OR_RAISE(multiply_datum1,
                             arrow::compute::Multiply(divide_datum1, 
columnDouble));
   ```
   I'm confident that the compiler is using AVX2 and SSE instruction sets. I 
examined the assembly code of my own row-based expression logic and found 
instructions such as `vmovdqa` and `vaddsd`.
   **I would like to know how to correctly use Arrow for expression computation 
to improve its execution efficiency?If there are any relevant reference 
documents available?**
   Thank you very much!
   
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to