Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Oct 31, 2025

Which issue does this PR close?

Rationale for this change

While reviewing #8745 I noticed the page was always copied into a new allocation even when there is at least one path that doesn't use it: #8745 (comment)

What changes are included in this PR?

  1. Avoid the copy
  2. Refactor the decompression logic into a function that makes it easier to see what is going on

Are these changes tested?

By CI, and I will run benchmarks

I also ran code coverage in the tests to see if this code path (decompressed_size == 0) is hit often:

cargo llvm-cov --html --all-features -p parquet

It does appear to happen, but not often in the tests (happens 3 times in the tests)

Screenshot 2025-10-31 at 9 42 46 AM

Are there any user-facing changes?

No

@github-actions github-actions bot added the parquet Changes to the parquet crate label Oct 31, 2025
let decompressed_size = uncompressed_page_size - offset;
let mut decompressed = Vec::with_capacity(uncompressed_page_size);
decompressed.extend_from_slice(&buffer.as_ref()[..offset]);
if decompressed_size > 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can see here that if decompressed_size is 0, it returns decompressed unmodified and decompressed was just the first offset bytes of the input buffer

I changed the code to return buffer.slice(..offset) in this case

I can add it to this location directly to make the diff smaller, but the logic was already hard to follow and highly indented to I moved it into its own function while I was at it


let decompressed_size = uncompressed_page_size - offset;

if decompressed_size == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me 👍

Comment on lines 390 to 391
// TODO: page header could be huge because of statistics. We should set a
// maximum page header size and abort if that is exceeded.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not relevant to this PR, but I think this TODO has largely been addressed by #8376 which enabled skipping the decoding of the page statistics.

Comment on lines +459 to +460
/// the provided decompressor if available and applicable. If the buffer is not
/// compressed, it will be returned as is.
Copy link
Member

@mapleFU mapleFU Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me but the I don't know if the comment "not compressed" can be replaced, if decompress_buffer is called and decompressed_size == 0 , seems that it generally means something like "this page only have levels, but not have non-null values"? ( Point me out if I'm wrong)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually also do not know what decompressed_size really means -- you are probably right. I will research it more carefully

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read https://github.com/apache/parquet-format/blob/master/README.md#data-pages and I agree with your assessment that if the decompressed_size=0 it corresponds to no non-null values

@alamb
Copy link
Contributor Author

alamb commented Oct 31, 2025

🤖 ./gh_compare_arrow.sh Benchmark Script Running
Linux aal-dev 6.14.0-1017-gcp #18~24.04.1-Ubuntu SMP Tue Sep 23 17:51:44 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Comparing alamb/reduce_allocation (fd4e874) to cd61ead diff
BENCH_NAME=arrow_reader
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench arrow_reader
BENCH_FILTER=
BENCH_BRANCH_NAME=alamb_reduce_allocation
Results will be posted here when complete

@alamb
Copy link
Contributor Author

alamb commented Oct 31, 2025

🤖: Benchmark completed

Details

group                                                                                                      alamb_reduce_allocation                main
-----                                                                                                      -----------------------                ----
arrow_array_reader/BYTE_ARRAY/Decimal128Array/plain encoded, mandatory, no NULLs                           1.00   1274.7±6.64µs        ? ?/sec    1.01   1283.3±6.60µs        ? ?/sec
arrow_array_reader/BYTE_ARRAY/Decimal128Array/plain encoded, optional, half NULLs                          1.02   1310.0±6.20µs        ? ?/sec    1.00   1280.8±3.61µs        ? ?/sec
arrow_array_reader/BYTE_ARRAY/Decimal128Array/plain encoded, optional, no NULLs                            1.00   1280.3±3.69µs        ? ?/sec    1.01   1288.1±5.90µs        ? ?/sec
arrow_array_reader/BinaryArray/dictionary encoded, mandatory, no NULLs                                     1.01    501.3±4.54µs        ? ?/sec    1.00    494.6±3.26µs        ? ?/sec
arrow_array_reader/BinaryArray/dictionary encoded, optional, half NULLs                                    1.05    671.7±2.38µs        ? ?/sec    1.00    637.4±3.70µs        ? ?/sec
arrow_array_reader/BinaryArray/dictionary encoded, optional, no NULLs                                      1.03    502.0±4.79µs        ? ?/sec    1.00    486.2±4.44µs        ? ?/sec
arrow_array_reader/BinaryArray/plain encoded, mandatory, no NULLs                                          1.00    572.7±2.91µs        ? ?/sec    1.00    574.6±4.57µs        ? ?/sec
arrow_array_reader/BinaryArray/plain encoded, optional, half NULLs                                         1.02    736.4±3.21µs        ? ?/sec    1.00    722.6±3.70µs        ? ?/sec
arrow_array_reader/BinaryArray/plain encoded, optional, no NULLs                                           1.00    583.3±3.41µs        ? ?/sec    1.00    580.5±4.39µs        ? ?/sec
arrow_array_reader/BinaryViewArray/dictionary encoded, mandatory, no NULLs                                 1.00    249.2±4.12µs        ? ?/sec    1.04    259.8±2.20µs        ? ?/sec
arrow_array_reader/BinaryViewArray/dictionary encoded, optional, half NULLs                                1.00    255.3±1.42µs        ? ?/sec    1.04    264.7±3.16µs        ? ?/sec
arrow_array_reader/BinaryViewArray/dictionary encoded, optional, no NULLs                                  1.00    256.0±3.32µs        ? ?/sec    1.05    269.2±3.56µs        ? ?/sec
arrow_array_reader/BinaryViewArray/plain encoded, mandatory, no NULLs                                      1.00    288.0±1.26µs        ? ?/sec    1.27    365.1±2.87µs        ? ?/sec
arrow_array_reader/BinaryViewArray/plain encoded, mandatory, no NULLs, short string                        1.00    280.1±0.87µs        ? ?/sec    1.25    349.0±4.91µs        ? ?/sec
arrow_array_reader/BinaryViewArray/plain encoded, optional, half NULLs                                     1.00    286.9±1.34µs        ? ?/sec    1.12    322.1±4.55µs        ? ?/sec
arrow_array_reader/BinaryViewArray/plain encoded, optional, no NULLs                                       1.00    297.2±2.24µs        ? ?/sec    1.26    373.7±1.48µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Decimal128Array/byte_stream_split encoded, mandatory, no NULLs     1.00  1083.5±17.62µs        ? ?/sec    1.04   1128.2±2.96µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Decimal128Array/byte_stream_split encoded, optional, half NULLs    1.00    932.1±3.35µs        ? ?/sec    1.03    960.2±3.61µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Decimal128Array/byte_stream_split encoded, optional, no NULLs      1.00   1086.1±9.63µs        ? ?/sec    1.04   1132.6±3.12µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Decimal128Array/plain encoded, mandatory, no NULLs                 1.01    454.1±2.50µs        ? ?/sec    1.00    451.7±2.56µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Decimal128Array/plain encoded, optional, half NULLs                1.00    614.2±3.72µs        ? ?/sec    1.04   636.1±12.24µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Decimal128Array/plain encoded, optional, no NULLs                  1.00    459.6±1.78µs        ? ?/sec    1.01    464.4±7.89µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Float16Array/byte_stream_split encoded, mandatory, no NULLs        1.00    153.1±0.39µs        ? ?/sec    1.06    161.5±0.31µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Float16Array/byte_stream_split encoded, optional, half NULLs       1.00    296.7±0.92µs        ? ?/sec    1.03    305.1±1.48µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Float16Array/byte_stream_split encoded, optional, no NULLs         1.00    159.7±0.80µs        ? ?/sec    1.06    170.0±1.42µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Float16Array/plain encoded, mandatory, no NULLs                    1.00     76.1±0.25µs        ? ?/sec    1.02     77.8±0.35µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Float16Array/plain encoded, optional, half NULLs                   1.00    258.0±1.05µs        ? ?/sec    1.01    261.1±0.78µs        ? ?/sec
arrow_array_reader/FIXED_LEN_BYTE_ARRAY/Float16Array/plain encoded, optional, no NULLs                     1.00     81.6±0.38µs        ? ?/sec    1.03     83.8±1.09µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(16)/byte_stream_split encoded, mandatory, no NULLs                    1.00    689.9±2.39µs        ? ?/sec    1.07    736.7±2.17µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(16)/byte_stream_split encoded, optional, half NULLs                   1.00    528.0±1.86µs        ? ?/sec    1.09    578.0±3.57µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(16)/byte_stream_split encoded, optional, no NULLs                     1.00    695.5±4.28µs        ? ?/sec    1.07    743.3±3.09µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(16)/plain encoded, mandatory, no NULLs                                1.03     69.3±6.77µs        ? ?/sec    1.00     67.5±2.58µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(16)/plain encoded, optional, half NULLs                               1.00    219.3±1.49µs        ? ?/sec    1.14    249.1±1.58µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(16)/plain encoded, optional, no NULLs                                 1.02     76.0±5.53µs        ? ?/sec    1.00     74.9±3.31µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(2)/byte_stream_split encoded, mandatory, no NULLs                     1.00     86.5±0.43µs        ? ?/sec    1.09     94.5±0.26µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(2)/byte_stream_split encoded, optional, half NULLs                    1.00    229.5±1.31µs        ? ?/sec    1.02    235.0±0.45µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(2)/byte_stream_split encoded, optional, no NULLs                      1.00     91.5±0.60µs        ? ?/sec    1.09     99.7±0.28µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(2)/plain encoded, mandatory, no NULLs                                 1.02      9.5±0.30µs        ? ?/sec    1.00      9.3±0.10µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(2)/plain encoded, optional, half NULLs                                1.00    189.4±0.49µs        ? ?/sec    1.01    191.5±0.29µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(2)/plain encoded, optional, no NULLs                                  1.00     14.5±0.21µs        ? ?/sec    1.01     14.6±0.10µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(4)/byte_stream_split encoded, mandatory, no NULLs                     1.00    170.6±0.51µs        ? ?/sec    1.08    184.5±0.72µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(4)/byte_stream_split encoded, optional, half NULLs                    1.01    348.4±1.46µs        ? ?/sec    1.00    344.0±1.00µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(4)/byte_stream_split encoded, optional, no NULLs                      1.00    176.2±1.21µs        ? ?/sec    1.08    189.5±0.41µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(4)/plain encoded, mandatory, no NULLs                                 1.13     14.7±0.50µs        ? ?/sec    1.00     13.0±0.38µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(4)/plain encoded, optional, half NULLs                                1.03    268.7±1.02µs        ? ?/sec    1.00    260.0±1.55µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(4)/plain encoded, optional, no NULLs                                  1.03     20.9±0.99µs        ? ?/sec    1.00     20.3±0.54µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(8)/byte_stream_split encoded, mandatory, no NULLs                     1.00    342.7±1.59µs        ? ?/sec    1.07    366.3±1.11µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(8)/byte_stream_split encoded, optional, half NULLs                    1.00    338.2±6.82µs        ? ?/sec    1.13    381.3±0.86µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(8)/byte_stream_split encoded, optional, no NULLs                      1.00    348.6±1.06µs        ? ?/sec    1.07    373.0±1.35µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(8)/plain encoded, mandatory, no NULLs                                 1.04     26.7±0.39µs        ? ?/sec    1.00     25.8±0.34µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(8)/plain encoded, optional, half NULLs                                1.00    182.2±1.27µs        ? ?/sec    1.19    215.9±0.66µs        ? ?/sec
arrow_array_reader/FixedLenByteArray(8)/plain encoded, optional, no NULLs                                  1.05     33.8±0.58µs        ? ?/sec    1.00     32.3±0.27µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/binary packed skip, mandatory, no NULLs                           1.01    124.4±1.07µs        ? ?/sec    1.00    123.6±0.32µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/binary packed skip, optional, half NULLs                          1.01    124.8±0.64µs        ? ?/sec    1.00    124.2±0.45µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/binary packed skip, optional, no NULLs                            1.00    127.1±0.34µs        ? ?/sec    1.00    127.1±0.34µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/binary packed, mandatory, no NULLs                                1.01    180.0±0.67µs        ? ?/sec    1.00    177.9±0.99µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/binary packed, optional, half NULLs                               1.01    207.8±1.53µs        ? ?/sec    1.00    205.9±0.86µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/binary packed, optional, no NULLs                                 1.02    185.3±0.67µs        ? ?/sec    1.00    182.4±0.40µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/byte_stream_split encoded, mandatory, no NULLs                    1.00     75.8±0.34µs        ? ?/sec    1.03     78.4±0.41µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/byte_stream_split encoded, optional, half NULLs                   1.02    155.9±0.59µs        ? ?/sec    1.00    153.4±0.81µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/byte_stream_split encoded, optional, no NULLs                     1.01     82.9±0.28µs        ? ?/sec    1.00     82.4±0.36µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/dictionary encoded, mandatory, no NULLs                           1.00    135.8±0.52µs        ? ?/sec    1.00    135.4±0.50µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/dictionary encoded, optional, half NULLs                          1.01    187.6±0.61µs        ? ?/sec    1.00    185.8±0.30µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/dictionary encoded, optional, no NULLs                            1.01    141.8±2.40µs        ? ?/sec    1.00    140.8±0.64µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/plain encoded, mandatory, no NULLs                                1.00     72.6±0.27µs        ? ?/sec    1.04     75.2±0.28µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/plain encoded, optional, half NULLs                               1.01    152.7±0.86µs        ? ?/sec    1.00    151.9±0.84µs        ? ?/sec
arrow_array_reader/INT32/Decimal128Array/plain encoded, optional, no NULLs                                 1.00     78.5±0.26µs        ? ?/sec    1.01     79.0±0.49µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/binary packed skip, mandatory, no NULLs                           1.03    116.6±2.14µs        ? ?/sec    1.00    113.5±0.19µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/binary packed skip, optional, half NULLs                          1.01    133.8±0.43µs        ? ?/sec    1.00    132.5±0.41µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/binary packed skip, optional, no NULLs                            1.01    116.8±0.47µs        ? ?/sec    1.00    115.8±0.54µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/binary packed, mandatory, no NULLs                                1.01    171.0±0.75µs        ? ?/sec    1.00    169.8±0.57µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/binary packed, optional, half NULLs                               1.00    237.1±0.69µs        ? ?/sec    1.00    236.6±1.61µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/binary packed, optional, no NULLs                                 1.01    177.2±2.57µs        ? ?/sec    1.00    175.4±0.77µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/byte_stream_split encoded, mandatory, no NULLs                    1.00    205.0±0.81µs        ? ?/sec    1.00    205.0±0.55µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/byte_stream_split encoded, optional, half NULLs                   1.00    250.9±1.01µs        ? ?/sec    1.00    251.1±1.19µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/byte_stream_split encoded, optional, no NULLs                     1.00    210.3±1.12µs        ? ?/sec    1.01    212.1±0.79µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/dictionary encoded, mandatory, no NULLs                           1.00    142.5±0.35µs        ? ?/sec    1.00    142.7±0.83µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/dictionary encoded, optional, half NULLs                          1.00    217.4±0.75µs        ? ?/sec    1.00    217.0±1.22µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/dictionary encoded, optional, no NULLs                            1.00    148.3±0.37µs        ? ?/sec    1.00    148.2±1.12µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/plain encoded, mandatory, no NULLs                                1.06    108.0±1.05µs        ? ?/sec    1.00    102.2±1.16µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/plain encoded, optional, half NULLs                               1.01    198.8±0.81µs        ? ?/sec    1.00    196.2±0.84µs        ? ?/sec
arrow_array_reader/INT64/Decimal128Array/plain encoded, optional, no NULLs                                 1.06    118.1±0.93µs        ? ?/sec    1.00    111.0±1.34µs        ? ?/sec
arrow_array_reader/Int16Array/binary packed skip, mandatory, no NULLs                                      1.00     98.7±0.20µs        ? ?/sec    1.00     99.0±0.27µs        ? ?/sec
arrow_array_reader/Int16Array/binary packed skip, optional, half NULLs                                     1.00    101.8±0.20µs        ? ?/sec    1.00    102.0±0.24µs        ? ?/sec
arrow_array_reader/Int16Array/binary packed skip, optional, no NULLs                                       1.00    101.6±0.30µs        ? ?/sec    1.00    101.9±0.26µs        ? ?/sec
arrow_array_reader/Int16Array/binary packed, mandatory, no NULLs                                           1.00    134.8±0.28µs        ? ?/sec    1.00    134.3±0.29µs        ? ?/sec
arrow_array_reader/Int16Array/binary packed, optional, half NULLs                                          1.01    165.5±0.55µs        ? ?/sec    1.00    164.5±0.85µs        ? ?/sec
arrow_array_reader/Int16Array/binary packed, optional, no NULLs                                            1.01    140.1±0.35µs        ? ?/sec    1.00    138.3±1.05µs        ? ?/sec
arrow_array_reader/Int16Array/byte_stream_split encoded, mandatory, no NULLs                               1.00     42.4±0.15µs        ? ?/sec    1.04     44.0±0.13µs        ? ?/sec
arrow_array_reader/Int16Array/byte_stream_split encoded, optional, half NULLs                              1.01    117.9±0.48µs        ? ?/sec    1.00    117.0±0.28µs        ? ?/sec
arrow_array_reader/Int16Array/byte_stream_split encoded, optional, no NULLs                                1.01     49.2±0.16µs        ? ?/sec    1.00     48.6±0.22µs        ? ?/sec
arrow_array_reader/Int16Array/dictionary encoded, mandatory, no NULLs                                      1.00    102.5±0.35µs        ? ?/sec    1.00    102.7±0.30µs        ? ?/sec
arrow_array_reader/Int16Array/dictionary encoded, optional, half NULLs                                     1.01    151.7±0.33µs        ? ?/sec    1.00    149.5±0.30µs        ? ?/sec
arrow_array_reader/Int16Array/dictionary encoded, optional, no NULLs                                       1.01    108.2±0.29µs        ? ?/sec    1.00    107.2±0.28µs        ? ?/sec
arrow_array_reader/Int16Array/plain encoded, mandatory, no NULLs                                           1.01     38.3±0.22µs        ? ?/sec    1.00     38.0±0.15µs        ? ?/sec
arrow_array_reader/Int16Array/plain encoded, optional, half NULLs                                          1.02    116.1±0.39µs        ? ?/sec    1.00    114.2±0.27µs        ? ?/sec
arrow_array_reader/Int16Array/plain encoded, optional, no NULLs                                            1.01     43.7±0.10µs        ? ?/sec    1.00     43.1±0.17µs        ? ?/sec
arrow_array_reader/Int32Array/binary packed skip, mandatory, no NULLs                                      1.00     98.3±0.81µs        ? ?/sec    1.00     98.5±0.30µs        ? ?/sec
arrow_array_reader/Int32Array/binary packed skip, optional, half NULLs                                     1.00     97.0±0.76µs        ? ?/sec    1.00     97.0±0.22µs        ? ?/sec
arrow_array_reader/Int32Array/binary packed skip, optional, no NULLs                                       1.00    101.0±0.88µs        ? ?/sec    1.00    100.6±0.30µs        ? ?/sec
arrow_array_reader/Int32Array/binary packed, mandatory, no NULLs                                           1.00    126.7±0.35µs        ? ?/sec    1.00    127.2±0.45µs        ? ?/sec
arrow_array_reader/Int32Array/binary packed, optional, half NULLs                                          1.00    150.3±0.34µs        ? ?/sec    1.01    152.5±0.87µs        ? ?/sec
arrow_array_reader/Int32Array/binary packed, optional, no NULLs                                            1.01    131.5±0.35µs        ? ?/sec    1.00    130.0±0.43µs        ? ?/sec
arrow_array_reader/Int32Array/byte_stream_split encoded, mandatory, no NULLs                               1.01     26.3±0.42µs        ? ?/sec    1.00     26.0±0.34µs        ? ?/sec
arrow_array_reader/Int32Array/byte_stream_split encoded, optional, half NULLs                              1.00     98.9±0.33µs        ? ?/sec    1.00     98.6±0.64µs        ? ?/sec
arrow_array_reader/Int32Array/byte_stream_split encoded, optional, no NULLs                                1.00     30.0±0.26µs        ? ?/sec    1.01     30.3±0.20µs        ? ?/sec
arrow_array_reader/Int32Array/dictionary encoded, mandatory, no NULLs                                      1.00     85.0±0.85µs        ? ?/sec    1.00     84.9±0.37µs        ? ?/sec
arrow_array_reader/Int32Array/dictionary encoded, optional, half NULLs                                     1.00    131.9±1.33µs        ? ?/sec    1.00    132.0±0.62µs        ? ?/sec
arrow_array_reader/Int32Array/dictionary encoded, optional, no NULLs                                       1.02     91.1±4.21µs        ? ?/sec    1.00     89.6±0.43µs        ? ?/sec
arrow_array_reader/Int32Array/plain encoded, mandatory, no NULLs                                           1.01     18.0±0.54µs        ? ?/sec    1.00     17.9±0.46µs        ? ?/sec
arrow_array_reader/Int32Array/plain encoded, optional, half NULLs                                          1.00     92.5±0.23µs        ? ?/sec    1.04     96.2±0.33µs        ? ?/sec
arrow_array_reader/Int32Array/plain encoded, optional, no NULLs                                            1.05     25.8±0.42µs        ? ?/sec    1.00     24.7±0.41µs        ? ?/sec
arrow_array_reader/Int64Array/binary packed skip, mandatory, no NULLs                                      1.02     87.3±0.34µs        ? ?/sec    1.00     85.8±0.34µs        ? ?/sec
arrow_array_reader/Int64Array/binary packed skip, optional, half NULLs                                     1.01    106.5±0.63µs        ? ?/sec    1.00    105.0±0.96µs        ? ?/sec
arrow_array_reader/Int64Array/binary packed skip, optional, no NULLs                                       1.03     90.6±0.45µs        ? ?/sec    1.00     88.3±0.88µs        ? ?/sec
arrow_array_reader/Int64Array/binary packed, mandatory, no NULLs                                           1.00    118.1±0.81µs        ? ?/sec    1.00    118.2±1.47µs        ? ?/sec
arrow_array_reader/Int64Array/binary packed, optional, half NULLs                                          1.00    180.8±0.59µs        ? ?/sec    1.00    180.6±1.32µs        ? ?/sec
arrow_array_reader/Int64Array/binary packed, optional, no NULLs                                            1.01    122.7±0.50µs        ? ?/sec    1.00    121.4±1.40µs        ? ?/sec
arrow_array_reader/Int64Array/byte_stream_split encoded, mandatory, no NULLs                               1.00    149.9±3.97µs        ? ?/sec    1.00    149.4±0.37µs        ? ?/sec
arrow_array_reader/Int64Array/byte_stream_split encoded, optional, half NULLs                              1.00    194.4±2.08µs        ? ?/sec    1.00    193.9±1.27µs        ? ?/sec
arrow_array_reader/Int64Array/byte_stream_split encoded, optional, no NULLs                                1.00    154.8±1.21µs        ? ?/sec    1.00    155.2±0.47µs        ? ?/sec
arrow_array_reader/Int64Array/dictionary encoded, mandatory, no NULLs                                      1.02     91.2±0.68µs        ? ?/sec    1.00     89.5±0.91µs        ? ?/sec
arrow_array_reader/Int64Array/dictionary encoded, optional, half NULLs                                     1.01    162.6±0.67µs        ? ?/sec    1.00    161.4±0.61µs        ? ?/sec
arrow_array_reader/Int64Array/dictionary encoded, optional, no NULLs                                       1.03     96.9±0.56µs        ? ?/sec    1.00     94.2±0.47µs        ? ?/sec
arrow_array_reader/Int64Array/plain encoded, mandatory, no NULLs                                           1.10     48.6±2.23µs        ? ?/sec    1.00     44.4±0.57µs        ? ?/sec
arrow_array_reader/Int64Array/plain encoded, optional, half NULLs                                          1.01    140.1±0.87µs        ? ?/sec    1.00    138.6±0.64µs        ? ?/sec
arrow_array_reader/Int64Array/plain encoded, optional, no NULLs                                            1.03     60.3±3.57µs        ? ?/sec    1.00     58.2±1.73µs        ? ?/sec
arrow_array_reader/Int8Array/binary packed skip, mandatory, no NULLs                                       1.00     97.9±0.34µs        ? ?/sec    1.00     97.7±0.33µs        ? ?/sec
arrow_array_reader/Int8Array/binary packed skip, optional, half NULLs                                      1.00     98.7±0.26µs        ? ?/sec    1.00     98.4±0.27µs        ? ?/sec
arrow_array_reader/Int8Array/binary packed skip, optional, no NULLs                                        1.01    100.8±0.24µs        ? ?/sec    1.00     99.4±0.35µs        ? ?/sec
arrow_array_reader/Int8Array/binary packed, mandatory, no NULLs                                            1.00    130.1±0.41µs        ? ?/sec    1.00    130.7±0.32µs        ? ?/sec
arrow_array_reader/Int8Array/binary packed, optional, half NULLs                                           1.01    158.0±0.64µs        ? ?/sec    1.00    157.1±0.81µs        ? ?/sec
arrow_array_reader/Int8Array/binary packed, optional, no NULLs                                             1.01    135.1±0.31µs        ? ?/sec    1.00    133.4±0.46µs        ? ?/sec
arrow_array_reader/Int8Array/byte_stream_split encoded, mandatory, no NULLs                                1.00     36.1±0.16µs        ? ?/sec    1.01     36.3±0.11µs        ? ?/sec
arrow_array_reader/Int8Array/byte_stream_split encoded, optional, half NULLs                               1.03    111.0±0.35µs        ? ?/sec    1.00    107.9±1.30µs        ? ?/sec
arrow_array_reader/Int8Array/byte_stream_split encoded, optional, no NULLs                                 1.01     41.3±0.09µs        ? ?/sec    1.00     40.7±0.40µs        ? ?/sec
arrow_array_reader/Int8Array/dictionary encoded, mandatory, no NULLs                                       1.00     94.1±0.61µs        ? ?/sec    1.00     94.2±0.35µs        ? ?/sec
arrow_array_reader/Int8Array/dictionary encoded, optional, half NULLs                                      1.01    143.8±0.31µs        ? ?/sec    1.00    141.7±0.43µs        ? ?/sec
arrow_array_reader/Int8Array/dictionary encoded, optional, no NULLs                                        1.01     99.9±0.76µs        ? ?/sec    1.00     99.1±0.36µs        ? ?/sec
arrow_array_reader/Int8Array/plain encoded, mandatory, no NULLs                                            1.00     30.2±0.14µs        ? ?/sec    1.01     30.5±0.18µs        ? ?/sec
arrow_array_reader/Int8Array/plain encoded, optional, half NULLs                                           1.01    106.9±0.42µs        ? ?/sec    1.00    105.6±0.49µs        ? ?/sec
arrow_array_reader/Int8Array/plain encoded, optional, no NULLs                                             1.02     35.9±0.09µs        ? ?/sec    1.00     35.1±0.35µs        ? ?/sec
arrow_array_reader/ListArray/plain encoded optional strings half NULLs                                     1.05      7.3±0.03ms        ? ?/sec    1.00      7.0±0.03ms        ? ?/sec
arrow_array_reader/ListArray/plain encoded optional strings no NULLs                                       1.03     13.3±0.16ms        ? ?/sec    1.00     12.9±0.13ms        ? ?/sec
arrow_array_reader/StringArray/dictionary encoded, mandatory, no NULLs                                     1.04    514.4±5.55µs        ? ?/sec    1.00    493.3±2.97µs        ? ?/sec
arrow_array_reader/StringArray/dictionary encoded, optional, half NULLs                                    1.05    684.8±3.69µs        ? ?/sec    1.00    652.5±3.07µs        ? ?/sec
arrow_array_reader/StringArray/dictionary encoded, optional, no NULLs                                      1.06   527.1±13.57µs        ? ?/sec    1.00    499.3±2.58µs        ? ?/sec
arrow_array_reader/StringArray/plain encoded, mandatory, no NULLs                                          1.08    727.1±4.74µs        ? ?/sec    1.00    670.4±3.43µs        ? ?/sec
arrow_array_reader/StringArray/plain encoded, optional, half NULLs                                         1.06    822.5±4.11µs        ? ?/sec    1.00    775.3±6.20µs        ? ?/sec
arrow_array_reader/StringArray/plain encoded, optional, no NULLs                                           1.08    736.4±4.23µs        ? ?/sec    1.00    683.1±4.87µs        ? ?/sec
arrow_array_reader/StringDictionary/dictionary encoded, mandatory, no NULLs                                1.01    297.6±1.39µs        ? ?/sec    1.00    294.3±3.74µs        ? ?/sec
arrow_array_reader/StringDictionary/dictionary encoded, optional, half NULLs                               1.02    387.1±1.69µs        ? ?/sec    1.00    377.8±2.59µs        ? ?/sec
arrow_array_reader/StringDictionary/dictionary encoded, optional, no NULLs                                 1.01    305.5±1.56µs        ? ?/sec    1.00    301.1±3.85µs        ? ?/sec
arrow_array_reader/StringViewArray/dictionary encoded, mandatory, no NULLs                                 1.00    252.0±4.44µs        ? ?/sec    1.00    252.2±2.40µs        ? ?/sec
arrow_array_reader/StringViewArray/dictionary encoded, optional, half NULLs                                1.00    255.3±0.74µs        ? ?/sec    1.02    261.4±1.18µs        ? ?/sec
arrow_array_reader/StringViewArray/dictionary encoded, optional, no NULLs                                  1.00    256.7±2.01µs        ? ?/sec    1.02    262.6±2.13µs        ? ?/sec
arrow_array_reader/StringViewArray/plain encoded, mandatory, no NULLs                                      1.05    477.1±2.04µs        ? ?/sec    1.00    454.6±5.67µs        ? ?/sec
arrow_array_reader/StringViewArray/plain encoded, optional, half NULLs                                     1.02    375.9±1.55µs        ? ?/sec    1.00    368.3±1.53µs        ? ?/sec
arrow_array_reader/StringViewArray/plain encoded, optional, no NULLs                                       1.05    486.6±2.12µs        ? ?/sec    1.00    463.9±5.64µs        ? ?/sec
arrow_array_reader/UInt16Array/binary packed skip, mandatory, no NULLs                                     1.05    112.9±0.24µs        ? ?/sec    1.00    107.5±0.21µs        ? ?/sec
arrow_array_reader/UInt16Array/binary packed skip, optional, half NULLs                                    1.04    109.6±0.33µs        ? ?/sec    1.00    105.7±1.08µs        ? ?/sec
arrow_array_reader/UInt16Array/binary packed skip, optional, no NULLs                                      1.06    116.0±0.44µs        ? ?/sec    1.00    109.7±0.18µs        ? ?/sec
arrow_array_reader/UInt16Array/binary packed, mandatory, no NULLs                                          1.07    156.9±1.14µs        ? ?/sec    1.00    146.1±0.37µs        ? ?/sec
arrow_array_reader/UInt16Array/binary packed, optional, half NULLs                                         1.04    177.4±0.75µs        ? ?/sec    1.00    169.9±0.61µs        ? ?/sec
arrow_array_reader/UInt16Array/binary packed, optional, no NULLs                                           1.08    162.0±0.46µs        ? ?/sec    1.00    150.0±0.31µs        ? ?/sec
arrow_array_reader/UInt16Array/byte_stream_split encoded, mandatory, no NULLs                              1.00     42.4±0.15µs        ? ?/sec    1.04     44.2±0.19µs        ? ?/sec
arrow_array_reader/UInt16Array/byte_stream_split encoded, optional, half NULLs                             1.00    117.1±0.42µs        ? ?/sec    1.00    117.2±0.49µs        ? ?/sec
arrow_array_reader/UInt16Array/byte_stream_split encoded, optional, no NULLs                               1.02     49.6±0.48µs        ? ?/sec    1.00     48.5±0.15µs        ? ?/sec
arrow_array_reader/UInt16Array/dictionary encoded, mandatory, no NULLs                                     1.00    102.6±0.24µs        ? ?/sec    1.00    102.4±0.30µs        ? ?/sec
arrow_array_reader/UInt16Array/dictionary encoded, optional, half NULLs                                    1.01    151.8±1.92µs        ? ?/sec    1.00    150.1±0.85µs        ? ?/sec
arrow_array_reader/UInt16Array/dictionary encoded, optional, no NULLs                                      1.01    108.0±0.26µs        ? ?/sec    1.00    107.1±0.23µs        ? ?/sec
arrow_array_reader/UInt16Array/plain encoded, mandatory, no NULLs                                          1.00     38.3±0.16µs        ? ?/sec    1.00     38.4±0.14µs        ? ?/sec
arrow_array_reader/UInt16Array/plain encoded, optional, half NULLs                                         1.03    116.4±0.74µs        ? ?/sec    1.00    113.2±0.81µs        ? ?/sec
arrow_array_reader/UInt16Array/plain encoded, optional, no NULLs                                           1.01     43.8±0.20µs        ? ?/sec    1.00     43.6±0.19µs        ? ?/sec
arrow_array_reader/UInt32Array/binary packed skip, mandatory, no NULLs                                     1.00     98.4±0.26µs        ? ?/sec    1.00     98.1±0.92µs        ? ?/sec
arrow_array_reader/UInt32Array/binary packed skip, optional, half NULLs                                    1.01     97.8±0.54µs        ? ?/sec    1.00     96.6±0.25µs        ? ?/sec
arrow_array_reader/UInt32Array/binary packed skip, optional, no NULLs                                      1.01    101.3±0.47µs        ? ?/sec    1.00    100.7±0.52µs        ? ?/sec
arrow_array_reader/UInt32Array/binary packed, mandatory, no NULLs                                          1.02    129.4±1.73µs        ? ?/sec    1.00    126.8±0.45µs        ? ?/sec
arrow_array_reader/UInt32Array/binary packed, optional, half NULLs                                         1.01    153.2±0.48µs        ? ?/sec    1.00    152.2±0.71µs        ? ?/sec
arrow_array_reader/UInt32Array/binary packed, optional, no NULLs                                           1.02    134.2±3.24µs        ? ?/sec    1.00    131.1±0.37µs        ? ?/sec
arrow_array_reader/UInt32Array/byte_stream_split encoded, mandatory, no NULLs                              1.06     26.2±0.23µs        ? ?/sec    1.00     24.7±0.20µs        ? ?/sec
arrow_array_reader/UInt32Array/byte_stream_split encoded, optional, half NULLs                             1.03    101.3±0.37µs        ? ?/sec    1.00     98.2±0.38µs        ? ?/sec
arrow_array_reader/UInt32Array/byte_stream_split encoded, optional, no NULLs                               1.09     31.8±0.38µs        ? ?/sec    1.00     29.3±0.22µs        ? ?/sec
arrow_array_reader/UInt32Array/dictionary encoded, mandatory, no NULLs                                     1.00     85.8±0.33µs        ? ?/sec    1.00     85.9±0.24µs        ? ?/sec
arrow_array_reader/UInt32Array/dictionary encoded, optional, half NULLs                                    1.01    133.7±0.32µs        ? ?/sec    1.00    132.9±0.37µs        ? ?/sec
arrow_array_reader/UInt32Array/dictionary encoded, optional, no NULLs                                      1.01     90.8±0.50µs        ? ?/sec    1.00     90.2±0.49µs        ? ?/sec
arrow_array_reader/UInt32Array/plain encoded, mandatory, no NULLs                                          1.01     21.2±0.49µs        ? ?/sec    1.00     21.1±0.62µs        ? ?/sec
arrow_array_reader/UInt32Array/plain encoded, optional, half NULLs                                         1.02     98.2±0.58µs        ? ?/sec    1.00     96.7±0.57µs        ? ?/sec
arrow_array_reader/UInt32Array/plain encoded, optional, no NULLs                                           1.02     26.9±0.50µs        ? ?/sec    1.00     26.5±0.76µs        ? ?/sec
arrow_array_reader/UInt64Array/binary packed skip, mandatory, no NULLs                                     1.02     87.4±0.33µs        ? ?/sec    1.00     85.7±0.40µs        ? ?/sec
arrow_array_reader/UInt64Array/binary packed skip, optional, half NULLs                                    1.02    107.1±2.73µs        ? ?/sec    1.00    104.7±1.05µs        ? ?/sec
arrow_array_reader/UInt64Array/binary packed skip, optional, no NULLs                                      1.03     90.6±0.26µs        ? ?/sec    1.00     88.2±0.22µs        ? ?/sec
arrow_array_reader/UInt64Array/binary packed, mandatory, no NULLs                                          1.00    117.2±0.51µs        ? ?/sec    1.01    118.1±0.55µs        ? ?/sec
arrow_array_reader/UInt64Array/binary packed, optional, half NULLs                                         1.01    181.6±0.38µs        ? ?/sec    1.00    180.0±0.83µs        ? ?/sec
arrow_array_reader/UInt64Array/binary packed, optional, no NULLs                                           1.01    122.8±0.61µs        ? ?/sec    1.00    122.2±1.25µs        ? ?/sec
arrow_array_reader/UInt64Array/byte_stream_split encoded, mandatory, no NULLs                              1.00    149.2±0.42µs        ? ?/sec    1.01    150.1±0.74µs        ? ?/sec
arrow_array_reader/UInt64Array/byte_stream_split encoded, optional, half NULLs                             1.00    195.4±0.75µs        ? ?/sec    1.01    196.6±1.67µs        ? ?/sec
arrow_array_reader/UInt64Array/byte_stream_split encoded, optional, no NULLs                               1.00    155.8±0.64µs        ? ?/sec    1.00    155.4±0.76µs        ? ?/sec
arrow_array_reader/UInt64Array/dictionary encoded, mandatory, no NULLs                                     1.01     91.3±0.44µs        ? ?/sec    1.00     90.1±0.44µs        ? ?/sec
arrow_array_reader/UInt64Array/dictionary encoded, optional, half NULLs                                    1.02    163.5±0.89µs        ? ?/sec    1.00    161.0±0.50µs        ? ?/sec
arrow_array_reader/UInt64Array/dictionary encoded, optional, no NULLs                                      1.02     96.2±0.52µs        ? ?/sec    1.00     94.0±0.35µs        ? ?/sec
arrow_array_reader/UInt64Array/plain encoded, mandatory, no NULLs                                          1.25     52.8±3.08µs        ? ?/sec    1.00     42.1±0.54µs        ? ?/sec
arrow_array_reader/UInt64Array/plain encoded, optional, half NULLs                                         1.01    140.5±1.59µs        ? ?/sec    1.00    139.3±0.63µs        ? ?/sec
arrow_array_reader/UInt64Array/plain encoded, optional, no NULLs                                           1.22     60.8±4.58µs        ? ?/sec    1.00     50.0±0.78µs        ? ?/sec
arrow_array_reader/UInt8Array/binary packed skip, mandatory, no NULLs                                      1.02    103.8±0.29µs        ? ?/sec    1.00    101.6±0.92µs        ? ?/sec
arrow_array_reader/UInt8Array/binary packed skip, optional, half NULLs                                     1.01    101.6±0.37µs        ? ?/sec    1.00    100.8±0.29µs        ? ?/sec
arrow_array_reader/UInt8Array/binary packed skip, optional, no NULLs                                       1.02    106.3±0.27µs        ? ?/sec    1.00    103.9±0.27µs        ? ?/sec
arrow_array_reader/UInt8Array/binary packed, mandatory, no NULLs                                           1.03    139.8±0.43µs        ? ?/sec    1.00    135.9±0.48µs        ? ?/sec
arrow_array_reader/UInt8Array/binary packed, optional, half NULLs                                          1.01    163.1±0.38µs        ? ?/sec    1.00    161.2±1.59µs        ? ?/sec
arrow_array_reader/UInt8Array/binary packed, optional, no NULLs                                            1.04    145.1±0.51µs        ? ?/sec    1.00    139.7±0.35µs        ? ?/sec
arrow_array_reader/UInt8Array/byte_stream_split encoded, mandatory, no NULLs                               1.01     36.5±0.11µs        ? ?/sec    1.00     36.2±0.11µs        ? ?/sec
arrow_array_reader/UInt8Array/byte_stream_split encoded, optional, half NULLs                              1.02    110.5±0.32µs        ? ?/sec    1.00    108.3±0.35µs        ? ?/sec
arrow_array_reader/UInt8Array/byte_stream_split encoded, optional, no NULLs                                1.03     41.7±0.15µs        ? ?/sec    1.00     40.4±0.17µs        ? ?/sec
arrow_array_reader/UInt8Array/dictionary encoded, mandatory, no NULLs                                      1.00     94.5±0.23µs        ? ?/sec    1.00     94.5±3.37µs        ? ?/sec
arrow_array_reader/UInt8Array/dictionary encoded, optional, half NULLs                                     1.01    141.9±0.41µs        ? ?/sec    1.00    140.8±0.40µs        ? ?/sec
arrow_array_reader/UInt8Array/dictionary encoded, optional, no NULLs                                       1.01     99.6±0.23µs        ? ?/sec    1.00     99.0±0.24µs        ? ?/sec
arrow_array_reader/UInt8Array/plain encoded, mandatory, no NULLs                                           1.00     29.8±0.08µs        ? ?/sec    1.02     30.4±0.30µs        ? ?/sec
arrow_array_reader/UInt8Array/plain encoded, optional, half NULLs                                          1.03    108.5±0.62µs        ? ?/sec    1.00    105.6±1.54µs        ? ?/sec
arrow_array_reader/UInt8Array/plain encoded, optional, no NULLs                                            1.03     36.0±0.21µs        ? ?/sec    1.00     34.8±0.10µs        ? ?/sec

@alamb
Copy link
Contributor Author

alamb commented Oct 31, 2025

🤖 ./gh_compare_arrow.sh Benchmark Script Running
Linux aal-dev 6.14.0-1017-gcp #18~24.04.1-Ubuntu SMP Tue Sep 23 17:51:44 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Comparing alamb/reduce_allocation (fd4e874) to cd61ead diff
BENCH_NAME=arrow_reader_clickbench
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench arrow_reader_clickbench
BENCH_FILTER=
BENCH_BRANCH_NAME=alamb_reduce_allocation
Results will be posted here when complete

@alamb
Copy link
Contributor Author

alamb commented Oct 31, 2025

🤖: Benchmark completed

Details

group                                alamb_reduce_allocation                main
-----                                -----------------------                ----
arrow_reader_clickbench/async/Q1     1.00      2.4±0.01ms        ? ?/sec    1.01      2.4±0.03ms        ? ?/sec
arrow_reader_clickbench/async/Q10    1.06     14.7±0.48ms        ? ?/sec    1.00     13.8±0.28ms        ? ?/sec
arrow_reader_clickbench/async/Q11    1.10     17.1±0.66ms        ? ?/sec    1.00     15.6±0.31ms        ? ?/sec
arrow_reader_clickbench/async/Q12    1.03     29.3±0.31ms        ? ?/sec    1.00     28.4±0.24ms        ? ?/sec
arrow_reader_clickbench/async/Q13    1.04     40.8±0.49ms        ? ?/sec    1.00     39.4±0.23ms        ? ?/sec
arrow_reader_clickbench/async/Q14    1.03     38.5±0.32ms        ? ?/sec    1.00     37.4±0.27ms        ? ?/sec
arrow_reader_clickbench/async/Q19    1.07      6.1±0.34ms        ? ?/sec    1.00      5.7±0.07ms        ? ?/sec
arrow_reader_clickbench/async/Q20    1.00    129.2±9.86ms        ? ?/sec    1.00    128.8±6.39ms        ? ?/sec
arrow_reader_clickbench/async/Q21    1.18   176.6±14.38ms        ? ?/sec    1.00    149.8±9.40ms        ? ?/sec
arrow_reader_clickbench/async/Q22    1.07   306.5±30.71ms        ? ?/sec    1.00   285.4±10.70ms        ? ?/sec
arrow_reader_clickbench/async/Q23    1.02    439.2±7.06ms        ? ?/sec    1.00    430.0±2.29ms        ? ?/sec
arrow_reader_clickbench/async/Q24    1.05     45.9±1.09ms        ? ?/sec    1.00     43.9±0.40ms        ? ?/sec
arrow_reader_clickbench/async/Q27    1.03    106.8±1.12ms        ? ?/sec    1.00    103.8±0.51ms        ? ?/sec
arrow_reader_clickbench/async/Q28    1.02    107.1±0.60ms        ? ?/sec    1.00    105.0±0.48ms        ? ?/sec
arrow_reader_clickbench/async/Q30    1.03     56.0±0.55ms        ? ?/sec    1.00     54.5±1.20ms        ? ?/sec
arrow_reader_clickbench/async/Q36    1.02    127.1±1.63ms        ? ?/sec    1.00    124.2±0.59ms        ? ?/sec
arrow_reader_clickbench/async/Q37    1.03    102.0±0.70ms        ? ?/sec    1.00     99.4±0.47ms        ? ?/sec
arrow_reader_clickbench/async/Q38    1.04     39.0±0.55ms        ? ?/sec    1.00     37.3±0.24ms        ? ?/sec
arrow_reader_clickbench/async/Q39    1.02     49.6±0.46ms        ? ?/sec    1.00     48.4±0.30ms        ? ?/sec
arrow_reader_clickbench/async/Q40    1.01     47.2±0.92ms        ? ?/sec    1.00     46.7±0.54ms        ? ?/sec
arrow_reader_clickbench/async/Q41    1.01     37.0±0.70ms        ? ?/sec    1.00     36.5±0.29ms        ? ?/sec
arrow_reader_clickbench/async/Q42    1.00     13.6±0.13ms        ? ?/sec    1.01     13.7±0.15ms        ? ?/sec
arrow_reader_clickbench/sync/Q1      1.00      2.1±0.01ms        ? ?/sec    1.00      2.1±0.01ms        ? ?/sec
arrow_reader_clickbench/sync/Q10     1.03      9.7±0.18ms        ? ?/sec    1.00      9.4±0.05ms        ? ?/sec
arrow_reader_clickbench/sync/Q11     1.05     11.6±0.13ms        ? ?/sec    1.00     11.0±0.11ms        ? ?/sec
arrow_reader_clickbench/sync/Q12     1.05     40.6±0.38ms        ? ?/sec    1.00     38.8±0.36ms        ? ?/sec
arrow_reader_clickbench/sync/Q13     1.03     51.7±0.51ms        ? ?/sec    1.00     50.1±0.54ms        ? ?/sec
arrow_reader_clickbench/sync/Q14     1.04     49.9±0.48ms        ? ?/sec    1.00     47.9±0.30ms        ? ?/sec
arrow_reader_clickbench/sync/Q19     1.04      4.4±0.10ms        ? ?/sec    1.00      4.3±0.02ms        ? ?/sec
arrow_reader_clickbench/sync/Q20     1.06    187.1±3.67ms        ? ?/sec    1.00    177.4±0.76ms        ? ?/sec
arrow_reader_clickbench/sync/Q21     1.02    247.4±5.79ms        ? ?/sec    1.00    243.1±3.53ms        ? ?/sec
arrow_reader_clickbench/sync/Q22     1.04    502.5±7.95ms        ? ?/sec    1.00    483.5±4.94ms        ? ?/sec
arrow_reader_clickbench/sync/Q23     1.07   473.9±15.67ms        ? ?/sec    1.00   440.9±15.03ms        ? ?/sec
arrow_reader_clickbench/sync/Q24     1.11     56.2±1.55ms        ? ?/sec    1.00     50.5±0.58ms        ? ?/sec
arrow_reader_clickbench/sync/Q27     1.05    162.4±2.87ms        ? ?/sec    1.00    154.2±1.43ms        ? ?/sec
arrow_reader_clickbench/sync/Q28     1.06    160.6±2.48ms        ? ?/sec    1.00    151.5±0.98ms        ? ?/sec
arrow_reader_clickbench/sync/Q30     1.03     53.6±0.41ms        ? ?/sec    1.00     52.0±0.28ms        ? ?/sec
arrow_reader_clickbench/sync/Q36     1.04    159.1±1.41ms        ? ?/sec    1.00    153.4±0.97ms        ? ?/sec
arrow_reader_clickbench/sync/Q37     1.03     93.4±1.25ms        ? ?/sec    1.00     90.9±1.01ms        ? ?/sec
arrow_reader_clickbench/sync/Q38     1.02     30.4±0.21ms        ? ?/sec    1.00     29.7±0.15ms        ? ?/sec
arrow_reader_clickbench/sync/Q39     1.02     35.3±0.46ms        ? ?/sec    1.00     34.6±0.54ms        ? ?/sec
arrow_reader_clickbench/sync/Q40     1.01     44.9±0.73ms        ? ?/sec    1.00     44.7±0.86ms        ? ?/sec
arrow_reader_clickbench/sync/Q41     1.05     35.3±0.81ms        ? ?/sec    1.00     33.5±0.25ms        ? ?/sec
arrow_reader_clickbench/sync/Q42     1.03     13.2±0.13ms        ? ?/sec    1.00     12.8±0.12ms        ? ?/sec

@alamb
Copy link
Contributor Author

alamb commented Oct 31, 2025

🤖 ./gh_compare_arrow.sh Benchmark Script Running
Linux aal-dev 6.14.0-1017-gcp #18~24.04.1-Ubuntu SMP Tue Sep 23 17:51:44 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Comparing alamb/reduce_allocation (fd4e874) to cd61ead diff
BENCH_NAME=arrow_reader_row_filter
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental --bench arrow_reader_row_filter
BENCH_FILTER=
BENCH_BRANCH_NAME=alamb_reduce_allocation
Results will be posted here when complete

@alamb
Copy link
Contributor Author

alamb commented Oct 31, 2025

🤖: Benchmark completed

Details

group                                                                                alamb_reduce_allocation                main
-----                                                                                -----------------------                ----
arrow_reader_row_filter/float64 <= 99.0/all_columns/async                            1.00  1730.5±14.17µs        ? ?/sec    1.01  1747.0±25.40µs        ? ?/sec
arrow_reader_row_filter/float64 <= 99.0/all_columns/sync                             1.00      2.0±0.02ms        ? ?/sec    1.03      2.1±0.03ms        ? ?/sec
arrow_reader_row_filter/float64 <= 99.0/exclude_filter_column/async                  1.00   1580.8±9.55µs        ? ?/sec    1.00   1577.1±8.69µs        ? ?/sec
arrow_reader_row_filter/float64 <= 99.0/exclude_filter_column/sync                   1.00  1673.4±15.90µs        ? ?/sec    1.00   1672.7±8.37µs        ? ?/sec
arrow_reader_row_filter/float64 > 99.0 AND ts >= 9000/all_columns/async              1.01  1548.5±17.54µs        ? ?/sec    1.00  1532.3±11.45µs        ? ?/sec
arrow_reader_row_filter/float64 > 99.0 AND ts >= 9000/all_columns/sync               1.03  1946.5±21.61µs        ? ?/sec    1.00  1892.3±17.76µs        ? ?/sec
arrow_reader_row_filter/float64 > 99.0 AND ts >= 9000/exclude_filter_column/async    1.02  1391.2±13.73µs        ? ?/sec    1.00   1363.6±9.90µs        ? ?/sec
arrow_reader_row_filter/float64 > 99.0 AND ts >= 9000/exclude_filter_column/sync     1.00  1496.4±12.36µs        ? ?/sec    1.00  1493.8±10.27µs        ? ?/sec
arrow_reader_row_filter/float64 > 99.0/all_columns/async                             1.00  1720.1±16.38µs        ? ?/sec    1.01  1740.3±14.38µs        ? ?/sec
arrow_reader_row_filter/float64 > 99.0/all_columns/sync                              1.00      2.0±0.01ms        ? ?/sec    1.01      2.0±0.02ms        ? ?/sec
arrow_reader_row_filter/float64 > 99.0/exclude_filter_column/async                   1.00   1575.3±9.98µs        ? ?/sec    1.01  1589.1±12.27µs        ? ?/sec
arrow_reader_row_filter/float64 > 99.0/exclude_filter_column/sync                    1.00   1661.4±7.30µs        ? ?/sec    1.02  1696.1±18.45µs        ? ?/sec
arrow_reader_row_filter/int64 == 9999/all_columns/async                              1.00    945.3±5.64µs        ? ?/sec    1.00    943.2±5.94µs        ? ?/sec
arrow_reader_row_filter/int64 == 9999/all_columns/sync                               1.00    983.8±7.54µs        ? ?/sec    1.01    998.4±5.43µs        ? ?/sec
arrow_reader_row_filter/int64 == 9999/exclude_filter_column/async                    1.00    853.6±6.76µs        ? ?/sec    1.01    863.3±7.96µs        ? ?/sec
arrow_reader_row_filter/int64 == 9999/exclude_filter_column/sync                     1.02    995.1±6.72µs        ? ?/sec    1.00    980.2±7.66µs        ? ?/sec
arrow_reader_row_filter/int64 > 90/all_columns/async                                 1.07      4.4±0.12ms        ? ?/sec    1.00      4.1±0.03ms        ? ?/sec
arrow_reader_row_filter/int64 > 90/all_columns/sync                                  1.04      4.3±0.18ms        ? ?/sec    1.00      4.1±0.03ms        ? ?/sec
arrow_reader_row_filter/int64 > 90/exclude_filter_column/async                       1.00      3.6±0.03ms        ? ?/sec    1.01      3.6±0.03ms        ? ?/sec
arrow_reader_row_filter/int64 > 90/exclude_filter_column/sync                        1.01      3.5±0.03ms        ? ?/sec    1.00      3.5±0.03ms        ? ?/sec
arrow_reader_row_filter/ts < 9000/all_columns/async                                  1.02      2.0±0.03ms        ? ?/sec    1.00  1984.3±10.80µs        ? ?/sec
arrow_reader_row_filter/ts < 9000/all_columns/sync                                   1.02      2.2±0.03ms        ? ?/sec    1.00      2.2±0.01ms        ? ?/sec
arrow_reader_row_filter/ts < 9000/exclude_filter_column/async                        1.01  1833.5±19.36µs        ? ?/sec    1.00   1817.9±9.11µs        ? ?/sec
arrow_reader_row_filter/ts < 9000/exclude_filter_column/sync                         1.01  1972.3±23.64µs        ? ?/sec    1.00   1955.7±9.04µs        ? ?/sec
arrow_reader_row_filter/ts >= 9000/all_columns/async                                 1.00   1277.5±9.05µs        ? ?/sec    1.00   1272.7±9.02µs        ? ?/sec
arrow_reader_row_filter/ts >= 9000/all_columns/sync                                  1.04  1479.0±90.59µs        ? ?/sec    1.00   1421.4±8.67µs        ? ?/sec
arrow_reader_row_filter/ts >= 9000/exclude_filter_column/async                       1.01  1173.6±11.30µs        ? ?/sec    1.00  1165.9±14.40µs        ? ?/sec
arrow_reader_row_filter/ts >= 9000/exclude_filter_column/sync                        1.01  1295.0±12.00µs        ? ?/sec    1.00  1281.9±12.03µs        ? ?/sec
arrow_reader_row_filter/utf8View <> ''/all_columns/async                             1.03      4.4±0.08ms        ? ?/sec    1.00      4.2±0.02ms        ? ?/sec
arrow_reader_row_filter/utf8View <> ''/all_columns/sync                              1.01      5.0±0.05ms        ? ?/sec    1.00      5.0±0.02ms        ? ?/sec
arrow_reader_row_filter/utf8View <> ''/exclude_filter_column/async                   1.00      3.6±0.02ms        ? ?/sec    1.00      3.6±0.01ms        ? ?/sec
arrow_reader_row_filter/utf8View <> ''/exclude_filter_column/sync                    1.00      3.5±0.03ms        ? ?/sec    1.00      3.5±0.02ms        ? ?/sec

@alamb
Copy link
Contributor Author

alamb commented Nov 1, 2025

If anything the benchmark results show a small, but consistent slowdown with this version

@alamb alamb closed this Nov 1, 2025
alamb added a commit that referenced this pull request Nov 6, 2025
# Which issue does this PR close?

- follow on to #8756

# Rationale for this change

@etseidl comments:
#8756 (comment)

> Not relevant to this PR, but I think this TODO has largely been
addressed by #8376 which enabled
skipping the decoding of the page statistics.

While I was in here, I also wanted to capture the learning based on
@mapleFU 's comment
#8756 (comment)

> The code looks good to me but the I don't know if the comment "not
compressed" can be replaced, if decompress_buffer is called and
decompressed_size == 0 , seems that it generally means something like
"this page only have levels, but not have non-null values"? ( Point me
out if I'm wrong)

# What changes are included in this PR?

Include some comments
# Are these changes tested?

No (there are no code changes)

# Are there any user-facing changes?

No, this is internal comments only. No code / behavior changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants