WillAyd commented on PR #1288:
URL: https://github.com/apache/arrow-adbc/pull/1288#issuecomment-1867917175

   OK I think this is reviewable now. Addressed some of the comments and 
improved test coverage.
   
   The algorithm to convert from Decimal to string is definitely slow. Here is 
what the benchmark looks like:
   
   ```
   2023-12-22T12:20:26-05:00
   Running ./release/driver/postgresql/postgresql-benchmark
   Run on (12 X 4700 MHz CPU s)
   CPU Caches:
     L1 Data 48 KiB (x6)
     L1 Instruction 32 KiB (x6)
     L2 Unified 1280 KiB (x6)
     L3 Unified 12288 KiB (x1)
   Load Average: 1.34, 0.70, 0.51
   ***WARNING*** CPU scaling is enabled, the benchmark real time measurements 
may be noisy and will incur extra overhead.
   
---------------------------------------------------------------------------------
   Benchmark                                       Time             CPU   
Iterations
   
---------------------------------------------------------------------------------
   BM_PostgresqlExecute/iterations:1         3757964 ns       277292 ns         
   1
   BM_PostgresqlDecimalWrite/iterations:1   28636835 ns     24109617 ns         
   1
   ```
   
   From some light research I think Arrow uses a "powers-of-ten" approach to 
determine what the digits should be. Happy to take a look at that in a follow 
up and see if we can make this faster


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