You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "bkietz (via GitHub)" <gi...@apache.org> on 2023/06/08 19:34:26 UTC
[GitHub] [arrow] bkietz commented on pull request #35628: GH-35627: [C++][Format][Integration] Add string view to the arrow format
bkietz commented on PR #35628:
URL: https://github.com/apache/arrow/pull/35628#issuecomment-1583218617
Added some benchmarks to compare views to other strings: sort, filter and take. They show a pretty solid advantage for views across the board:
```
ArraySortIndicesStringNarrow/32768/10000 2592 us 2592 us 270 bytes_per_second=12.0556M/s items_per_second=1.58015M/s null_percent=0.01 size=32.768k
ArraySortIndicesStringViewNarrow/32768/10000 1435 us 1435 us 487 bytes_per_second=21.7779M/s items_per_second=2.85447M/s null_percent=0.01 size=32.768k
ArraySortIndicesStringWide/32768/10000 579 us 579 us 1158 bytes_per_second=53.9695M/s items_per_second=1.76847M/s null_percent=0.01 size=32.768k
ArraySortIndicesStringViewWide/32768/10000 360 us 360 us 1947 bytes_per_second=86.8699M/s items_per_second=2.84655M/s null_percent=0.01 size=32.768k
ArraySortIndicesStringNarrow/32768/100 2729 us 2728 us 264 bytes_per_second=11.4551M/s items_per_second=1.51647M/s null_percent=1 size=32.768k
ArraySortIndicesStringViewNarrow/32768/100 1504 us 1504 us 469 bytes_per_second=20.7756M/s items_per_second=2.75036M/s null_percent=1 size=32.768k
ArraySortIndicesStringWide/32768/100 604 us 604 us 1161 bytes_per_second=51.7466M/s items_per_second=1.71219M/s null_percent=1 size=32.768k
ArraySortIndicesStringViewWide/32768/100 378 us 378 us 1874 bytes_per_second=82.7329M/s items_per_second=2.73747M/s null_percent=1 size=32.768k
ArraySortIndicesStringNarrow/32768/10 2744 us 2738 us 261 bytes_per_second=11.4137M/s items_per_second=1.66221M/s null_percent=10 size=32.768k
ArraySortIndicesStringViewNarrow/32768/10 1515 us 1515 us 451 bytes_per_second=20.6207M/s items_per_second=3.00304M/s null_percent=10 size=32.768k
ArraySortIndicesStringWide/32768/10 606 us 606 us 1141 bytes_per_second=51.6015M/s items_per_second=1.87912M/s null_percent=10 size=32.768k
ArraySortIndicesStringViewWide/32768/10 385 us 385 us 1811 bytes_per_second=81.1959M/s items_per_second=2.95683M/s null_percent=10 size=32.768k
FilterStringFilterWithNulls/262144/3 459053 ns 458983 ns 1513 bytes_per_second=544.683M/s data null%=0.1 mask null%=5 select%=99.9 size=262.144k
FilterStringViewFilterWithNulls/262144/3 259758 ns 259726 ns 2655 bytes_per_second=962.554M/s data null%=0.1 mask null%=5 select%=99.9 size=262.144k
FilterStringFilterWithNulls/262144/4 382825 ns 382760 ns 1835 bytes_per_second=653.15M/s data null%=0.1 mask null%=5 select%=50 size=262.144k
FilterStringViewFilterWithNulls/262144/4 286098 ns 286058 ns 2445 bytes_per_second=873.947M/s data null%=0.1 mask null%=5 select%=50 size=262.144k
FilterStringFilterWithNulls/262144/5 102171 ns 102165 ns 6569 bytes_per_second=2.38968G/s data null%=0.1 mask null%=5 select%=1 size=262.144k
FilterStringViewFilterWithNulls/262144/5 102105 ns 102103 ns 6443 bytes_per_second=2.39112G/s data null%=0.1 mask null%=5 select%=1 size=262.144k
TakeStringRandomIndicesWithNulls/262144/1000 20474978 ns 20472750 ns 34 items_per_second=12.8045M/s null_percent=0.1 size=262.144k
TakeStringViewRandomIndicesWithNulls/262144/1000 3671899 ns 3671217 ns 189 items_per_second=71.4052M/s null_percent=0.1 size=262.144k
TakeStringRandomIndicesWithNulls/262144/10 23607594 ns 23604043 ns 32 items_per_second=11.1059M/s null_percent=10 size=262.144k
TakeStringViewRandomIndicesWithNulls/262144/10 5815274 ns 5815000 ns 117 items_per_second=45.0807M/s null_percent=10 size=262.144k
TakeStringMonotonicIndices/262144/1000 16678131 ns 16674676 ns 42 items_per_second=15.7211M/s null_percent=0.1 size=262.144k
TakeStringViewMonotonicIndices/262144/1000 3006358 ns 3005697 ns 242 items_per_second=87.2157M/s null_percent=0.1 size=262.144k
TakeStringMonotonicIndices/262144/10 16604476 ns 16601445 ns 43 items_per_second=15.7904M/s null_percent=10 size=262.144k
TakeStringViewMonotonicIndices/262144/10 3200316 ns 3200017 ns 218 items_per_second=81.9196M/s null_percent=10 size=262.144k
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org