You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/06/05 15:18:36 UTC

[GitHub] [arrow] wesm edited a comment on pull request #7356: ARROW-9034: [C++] Implement "BinaryBitBlockCounter", add single-word functions to BitBlockCounter

wesm edited a comment on pull request #7356:
URL: https://github.com/apache/arrow/pull/7356#issuecomment-639555962


   OK here are the fixed benchmarks. These match my intuition now. This shows that there is very little downside and nearly always upside to using `BitBlockCounter` over `BitmapReader` (at least when there is 1% nulls or less, when there is a higher percentage you don't drop that much performance for using it). There isn't a benchmark showing the naive double-BitmapReader for the binary case but that could be added too
   
   ```
   -----------------------------------------------------------------------------------
   Benchmark                                            Time           CPU Iterations
   -----------------------------------------------------------------------------------
   BitBlockCounterSum/8                           1732025 ns    1732026 ns        400   577.358M items/s
   BitBlockCounterSum/64                           832029 ns     832025 ns        836   1.17372G items/s
   BitBlockCounterSum/512                          265104 ns     265105 ns       2666   3.68368G items/s
   BitBlockCounterSum/4096                         151056 ns     151056 ns       4647   6.46488G items/s
   BitBlockCounterSum/32768                        138635 ns     138632 ns       5081    7.0443G items/s
   BitBlockCounterSum/65536                        137021 ns     137019 ns       4977    7.1272G items/s
   BitBlockCounterSumWithOffset/8                 1779549 ns    1779525 ns        395   561.948M items/s
   BitBlockCounterSumWithOffset/64                 855158 ns     855149 ns        823   1.14198G items/s
   BitBlockCounterSumWithOffset/512                273883 ns     273874 ns       2578   3.56574G items/s
   BitBlockCounterSumWithOffset/4096               154422 ns     154422 ns       4499   6.32397G items/s
   BitBlockCounterSumWithOffset/32768              141266 ns     141265 ns       4887   6.91299G items/s
   BitBlockCounterSumWithOffset/65536              140049 ns     140048 ns       5024   6.97305G items/s
   BitBlockCounterInlineSum/8                     1714554 ns    1714564 ns        410   583.239M items/s
   BitBlockCounterInlineSum/64                     802222 ns     802227 ns        878   1.21731G items/s
   BitBlockCounterInlineSum/512                    239832 ns     239831 ns       2897   4.07188G items/s
   BitBlockCounterInlineSum/4096                   129035 ns     129031 ns       5384   7.56842G items/s
   BitBlockCounterInlineSum/32768                  116983 ns     116981 ns       6003   8.34801G items/s
   BitBlockCounterInlineSum/65536                  116078 ns     116079 ns       6085    8.4129G items/s
   BitBlockCounterInlineSumWithOffset/8           1682920 ns    1682911 ns        414   594.209M items/s
   BitBlockCounterInlineSumWithOffset/64           809214 ns     809211 ns        874   1.20681G items/s
   BitBlockCounterInlineSumWithOffset/512          251953 ns     251951 ns       2756     3.876G items/s
   BitBlockCounterInlineSumWithOffset/4096         139827 ns     139826 ns       4988   6.98414G items/s
   BitBlockCounterInlineSumWithOffset/32768        127648 ns     127648 ns       5498   7.65041G items/s
   BitBlockCounterInlineSumWithOffset/65536        126759 ns     126756 ns       5551   7.70425G items/s
   BitBlockCounterFourWordsSum/8                  1655902 ns    1655861 ns        423   603.916M items/s
   BitBlockCounterFourWordsSum/64                 1000517 ns    1000507 ns        692   999.493M items/s
   BitBlockCounterFourWordsSum/512                 441463 ns     441466 ns       1595   2.21209G items/s
   BitBlockCounterFourWordsSum/4096                128194 ns     128193 ns       5484   7.61788G items/s
   BitBlockCounterFourWordsSum/32768                85335 ns      85334 ns       8050    11.444G items/s
   BitBlockCounterFourWordsSum/65536                82101 ns      82101 ns       8498   11.8947G items/s
   BitBlockCounterFourWordsSumWithOffset/8        1647208 ns    1647201 ns        422   607.091M items/s
   BitBlockCounterFourWordsSumWithOffset/64       1025215 ns    1025183 ns        700   975.436M items/s
   BitBlockCounterFourWordsSumWithOffset/512       462082 ns     462074 ns       1572   2.11343G items/s
   BitBlockCounterFourWordsSumWithOffset/4096      132541 ns     132540 ns       5257   7.36808G items/s
   BitBlockCounterFourWordsSumWithOffset/32768      92098 ns      92098 ns       7651   10.6035G items/s
   BitBlockCounterFourWordsSumWithOffset/65536      87406 ns      87406 ns       7908   11.1727G items/s
   BitmapReaderSum/8                              1600625 ns    1600619 ns        442   624.758M items/s
   BitmapReaderSum/64                              885446 ns     885445 ns        789   1.10291G items/s
   BitmapReaderSum/512                             805230 ns     805219 ns        862   1.21279G items/s
   BitmapReaderSum/4096                            794678 ns     794676 ns        870   1.22888G items/s
   BitmapReaderSum/32768                           793758 ns     793749 ns        869   1.23032G items/s
   BitmapReaderSum/65536                           794828 ns     794812 ns        879   1.22867G items/s
   BitmapReaderSumWithOffset/8                    1667559 ns    1667514 ns        419   599.695M items/s
   BitmapReaderSumWithOffset/64                    930337 ns     930335 ns        755   1074.88M items/s
   BitmapReaderSumWithOffset/512                   841240 ns     841236 ns        841   1.16087G items/s
   BitmapReaderSumWithOffset/4096                  840091 ns     840087 ns        853   1.16245G items/s
   BitmapReaderSumWithOffset/32768                 828098 ns     828103 ns        846   1.17928G items/s
   BitmapReaderSumWithOffset/65536                 831186 ns     831191 ns        854    1.1749G items/s
   BinaryBitBlockCounterSum/8                     2974962 ns    2974893 ns        235   336.146M items/s
   BinaryBitBlockCounterSum/64                    1697417 ns    1697403 ns        414   589.135M items/s
   BinaryBitBlockCounterSum/512                    622981 ns     622973 ns       1165   1.56758G items/s
   BinaryBitBlockCounterSum/4096                   251586 ns     251582 ns       2831   3.88168G items/s
   BinaryBitBlockCounterSum/32768                  202682 ns     202683 ns       3345   4.81817G items/s
   BinaryBitBlockCounterSum/65536                  192151 ns     192150 ns       3653    5.0823G items/s
   BinaryBitBlockCounterSumWithOffset/8           3178632 ns    3178625 ns        224   314.601M items/s
   BinaryBitBlockCounterSumWithOffset/64          1713947 ns    1713944 ns        404   583.449M items/s
   BinaryBitBlockCounterSumWithOffset/512          605481 ns     605476 ns       1158   1.61288G items/s
   BinaryBitBlockCounterSumWithOffset/4096         258490 ns     258489 ns       2716   3.77796G items/s
   BinaryBitBlockCounterSumWithOffset/32768        212582 ns     212577 ns       3273   4.59393G items/s
   BinaryBitBlockCounterSumWithOffset/65536        208857 ns     208857 ns       3357   4.67575G items/s
   ```


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org