[ 
https://issues.apache.org/jira/browse/ARROW-764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290264#comment-16290264
 ] 

ASF GitHub Bot commented on ARROW-764:
--------------------------------------

seibs opened a new pull request #1422: WIP ARROW-764: [C++] Improves 
performance of CopyBitmap and adds benchmarks
URL: https://github.com/apache/arrow/pull/1422
 
 
   I took a swing at improving the CopyBitmap performance (benchmarks below).  
I'm a C/C++ novice, so I thought I'd get some feedback before I went too much 
further.
   
   **Starting Point**
   ```
   Run on (4 X 2208 MHz CPU s)
   12/13/17 21:15:18
   Benchmark                                        Time           CPU 
Iterations
   
------------------------------------------------------------------------------
   BM_CopyBitmap/97.6563k/0/min_time:1.000       4779 us       4758 us        
289   20.0445MB/s
   BM_CopyBitmap/976.563k/0/min_time:1.000      47740 us      47476 us         
26   20.0875MB/s
   BM_CopyBitmap/97.6563k/4/min_time:1.000       4858 us       4866 us        
289   19.5991MB/s
   BM_CopyBitmap/976.563k/4/min_time:1.000      48117 us      47953 us         
29   19.8879MB/s
   ```
   
   **Using stanford bithacks for SetBitTo**
   ```
   Run on (4 X 2208 MHz CPU s)
   12/13/17 21:22:05
   Benchmark                                        Time           CPU 
Iterations
   
------------------------------------------------------------------------------
   BM_CopyBitmap/97.6563k/0/min_time:1.000       1647 us       1649 us        
815   57.8415MB/s
   BM_CopyBitmap/976.563k/0/min_time:1.000      16368 us      16397 us         
81   58.1629MB/s
   BM_CopyBitmap/97.6563k/4/min_time:1.000       1599 us       1610 us        
815   59.2186MB/s
   BM_CopyBitmap/976.563k/4/min_time:1.000      16026 us      16011 us         
81   59.5644MB/s
   ```
   
   **memcpy + shifting**
   *This solution provides varying performance depending on whether or not the 
bit offset is a multiple of 8*
   ```
   Run on (4 X 2208 MHz CPU s)
   12/13/17 21:23:44
   Benchmark                                        Time           CPU 
Iterations
   
------------------------------------------------------------------------------
   BM_CopyBitmap/97.6563k/0/min_time:1.000          5 us          5 us     
280000   18.9651GB/s
   BM_CopyBitmap/976.563k/0/min_time:1.000         62 us         61 us      
22400   15.1721GB/s
   BM_CopyBitmap/97.6563k/4/min_time:1.000        171 us        170 us       
6892   560.872MB/s
   BM_CopyBitmap/976.563k/4/min_time:1.000       1639 us       1639 us        
896   581.782MB/s
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [C++] Improve performance of CopyBitmap, add benchmarks
> -------------------------------------------------------
>
>                 Key: ARROW-764
>                 URL: https://issues.apache.org/jira/browse/ARROW-764
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Wes McKinney
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> This is follow up work after a discussion in the patch for ARROW-657



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to