Skip to content

perf: Remove bool_val from Parquet Thrift FieldIdentifier - #9945

Merged
alamb merged 5 commits into
apache:mainfrom
etseidl:thrift_bool
May 15, 2026
Merged

perf: Remove bool_val from Parquet Thrift FieldIdentifier#9945
alamb merged 5 commits into
apache:mainfrom
etseidl:thrift_bool

Conversation

@etseidl

@etseidl etseidl commented May 7, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Remove some unnecessary branching from a hot path in the Thrift parser, improving performance and making for easier to read code.

What changes are included in this PR?

Removes the bool_val field from FieldIdentifier.

Are these changes tested?

Covered by existing tests

Are there any user-facing changes?

No, this is an internal-only API

@github-actions github-actions Bot added the parquet Changes to the parquet crate label May 7, 2026
@etseidl

etseidl commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark metadata

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4398980387-2055-mrk95 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing thrift_bool (92eb8a7) to c2021f1 (merge-base) diff
BENCH_NAME=metadata
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadata
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                            main                                   thrift_bool
-----                                            ----                                   -----------
decode metadata (wide) with schema               1.07     29.2±1.30ms        ? ?/sec    1.00     27.3±0.99ms        ? ?/sec
decode metadata (wide) with skip PES             1.03     28.2±0.88ms        ? ?/sec    1.00     27.5±1.30ms        ? ?/sec
decode metadata (wide) with skip all stats       1.03     29.8±0.69ms        ? ?/sec    1.00     29.0±0.59ms        ? ?/sec
decode metadata (wide) with skip column stats    1.00     28.7±0.39ms        ? ?/sec    1.04     29.7±1.23ms        ? ?/sec
decode metadata (wide) with skip size stats      1.05     33.0±1.05ms        ? ?/sec    1.00     31.4±1.38ms        ? ?/sec
decode metadata (wide) with stats mask           1.02     28.3±1.00ms        ? ?/sec    1.00     27.9±1.31ms        ? ?/sec
decode metadata with schema                      1.00      4.1±0.01µs        ? ?/sec    1.00      4.1±0.04µs        ? ?/sec
decode metadata with skip PES                    1.00      6.9±0.03µs        ? ?/sec    1.02      7.0±0.07µs        ? ?/sec
decode metadata with skip column stats           1.00      6.7±0.06µs        ? ?/sec    1.00      6.8±0.04µs        ? ?/sec
decode metadata with stats mask                  1.00      6.9±0.01µs        ? ?/sec    1.01      7.0±0.06µs        ? ?/sec
decode parquet metadata                          1.00      7.2±0.01µs        ? ?/sec    1.01      7.2±0.07µs        ? ?/sec
decode parquet metadata (wide)                   1.00     30.4±0.80ms        ? ?/sec    1.00     30.4±1.64ms        ? ?/sec
decode parquet metadata w/ size stats (wide)     1.05     38.7±0.39ms        ? ?/sec    1.00     36.8±1.41ms        ? ?/sec
open(default)                                    1.01      7.8±0.01µs        ? ?/sec    1.00      7.7±0.02µs        ? ?/sec
open(page index)                                 1.18    133.0±0.47µs        ? ?/sec    1.00    112.9±0.16µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 150.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 147.6s
CPU sys 0.7s
Peak spill 0 B

branch

Metric Value
Wall time 145.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 144.3s
CPU sys 0.2s
Peak spill 0 B

File an issue against this benchmark runner

@etseidl etseidl changed the title [test] perf: Remove bool_val from Parquet Thrift FieldIdentifier perf: Remove bool_val from Parquet Thrift FieldIdentifier May 7, 2026
@etseidl
etseidl marked this pull request as ready for review May 7, 2026 16:55
@etseidl

etseidl commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark metadata

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4399991702-2062-vv7n4 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing thrift_bool (1081e7a) to 6ce4bc8 (merge-base) diff
BENCH_NAME=metadata
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadata
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                               main                                   thrift_bool
-----                                               ----                                   -----------
decode metadata (wide) with schema                  1.00     26.9±0.49ms        ? ?/sec    1.02     27.4±0.32ms        ? ?/sec
decode metadata (wide) with skip PES                1.00     26.5±0.47ms        ? ?/sec    1.02     27.1±0.33ms        ? ?/sec
decode metadata (wide) with skip all stats          1.00     28.1±0.42ms        ? ?/sec    1.02     28.7±0.32ms        ? ?/sec
decode metadata (wide) with skip column stats       1.00     27.8±0.51ms        ? ?/sec    1.01     28.1±0.28ms        ? ?/sec
decode metadata (wide) with skip size stats         1.00     30.8±0.50ms        ? ?/sec    1.02     31.4±0.28ms        ? ?/sec
decode metadata (wide) with stats mask              1.00     26.6±0.53ms        ? ?/sec    1.01     26.8±0.31ms        ? ?/sec
decode metadata with schema                         1.00      4.0±0.02µs        ? ?/sec    1.02      4.1±0.01µs        ? ?/sec
decode metadata with skip PES                       1.00      6.8±0.07µs        ? ?/sec    1.01      6.9±0.05µs        ? ?/sec
decode metadata with skip column stats              1.01      6.7±0.02µs        ? ?/sec    1.00      6.7±0.02µs        ? ?/sec
decode metadata with stats mask                     1.00      6.8±0.07µs        ? ?/sec    1.02      6.9±0.05µs        ? ?/sec
decode parquet metadata                             1.00      7.1±0.02µs        ? ?/sec    1.02      7.2±0.02µs        ? ?/sec
decode parquet metadata (wide)                      1.00     29.0±0.59ms        ? ?/sec    1.02     29.6±0.35ms        ? ?/sec
decode parquet metadata no path_in_schema (wide)    1.00     28.4±0.47ms        ? ?/sec    1.01     28.7±0.34ms        ? ?/sec
decode parquet metadata w/ size stats (wide)        1.00     35.9±0.53ms        ? ?/sec    1.01     36.2±0.32ms        ? ?/sec
open(default)                                       1.00      7.7±0.02µs        ? ?/sec    1.02      7.8±0.02µs        ? ?/sec
open(page index)                                    1.00    132.6±0.20µs        ? ?/sec    1.00    133.0±0.28µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 151.6s
CPU sys 0.8s
Peak spill 0 B

branch

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 153.3s
CPU sys 0.2s
Peak spill 0 B

File an issue against this benchmark runner

@etseidl

etseidl commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

bench results look weird. On x86 WS got

group                                               bool                                   main
-----                                               ----                                   ----
decode metadata (wide) with schema                  1.00     15.5±0.12ms        ? ?/sec    1.09     16.9±0.13ms        ? ?/sec
decode metadata (wide) with skip PES                1.00     15.6±0.23ms        ? ?/sec    1.09     17.1±0.23ms        ? ?/sec
decode metadata (wide) with skip all stats          1.00     18.0±0.10ms        ? ?/sec    1.08     19.4±0.10ms        ? ?/sec
decode metadata (wide) with skip column stats       1.00     17.0±0.11ms        ? ?/sec    1.08     18.3±0.15ms        ? ?/sec
decode metadata (wide) with skip size stats         1.00     18.2±0.12ms        ? ?/sec    1.11     20.1±0.11ms        ? ?/sec
decode metadata (wide) with stats mask              1.00     15.6±0.10ms        ? ?/sec    1.09     17.1±0.11ms        ? ?/sec
decode metadata with schema                         1.00      2.6±0.01µs        ? ?/sec    1.05      2.8±0.02µs        ? ?/sec
decode metadata with skip PES                       1.00      4.5±0.06µs        ? ?/sec    1.04      4.7±0.05µs        ? ?/sec
decode metadata with skip column stats              1.00      4.7±0.02µs        ? ?/sec    1.03      4.8±0.05µs        ? ?/sec
decode metadata with stats mask                     1.00      4.5±0.06µs        ? ?/sec    1.05      4.7±0.06µs        ? ?/sec
decode parquet metadata                             1.00      4.8±0.05µs        ? ?/sec    1.06      5.1±0.02µs        ? ?/sec
decode parquet metadata (wide)                      1.00     17.3±0.31ms        ? ?/sec    1.08     18.7±0.24ms        ? ?/sec
decode parquet metadata no path_in_schema (wide)    1.00     16.7±0.08ms        ? ?/sec    1.09     18.2±0.11ms        ? ?/sec
decode parquet metadata w/ size stats (wide)        1.00     21.0±0.19ms        ? ?/sec    1.07     22.4±0.28ms        ? ?/sec
open(default)                                       1.00      5.3±0.02µs        ? ?/sec    1.04      5.5±0.03µs        ? ?/sec
open(page index)                                    1.00     94.4±1.19µs        ? ?/sec    1.02     96.4±2.76µs        ? ?/sec

@etseidl

etseidl commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark metadata

@alamb

alamb commented May 8, 2026

Copy link
Copy Markdown
Contributor

run benchmarks metadata

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The code certainly looks nicer in my mind ❤️

I agree we should sort out the benchmarks

@alamb

alamb commented May 8, 2026

Copy link
Copy Markdown
Contributor

Benchmarks seem not to be working. Maybe related to this

@etseidl

etseidl commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark metadata

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4425427881-15-czwcp 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing thrift_bool (f58ff9b) to 7abb225 (merge-base) diff
BENCH_NAME=metadata
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadata
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

@etseidl

etseidl commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

adriangb/datafusion-benchmarking#7 seems to have fixed benchmarks

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                               main                                   thrift_bool
-----                                               ----                                   -----------
decode metadata (wide) with schema                  1.00     26.8±0.43ms        ? ?/sec    1.03     27.6±0.34ms        ? ?/sec
decode metadata (wide) with skip PES                1.00     26.4±0.44ms        ? ?/sec    1.04     27.4±0.33ms        ? ?/sec
decode metadata (wide) with skip all stats          1.00     28.3±0.45ms        ? ?/sec    1.02     29.0±0.36ms        ? ?/sec
decode metadata (wide) with skip column stats       1.00     27.6±0.45ms        ? ?/sec    1.03     28.3±0.34ms        ? ?/sec
decode metadata (wide) with skip size stats         1.00     30.7±0.47ms        ? ?/sec    1.02     31.3±0.34ms        ? ?/sec
decode metadata (wide) with stats mask              1.00     26.5±0.44ms        ? ?/sec    1.03     27.2±0.32ms        ? ?/sec
decode metadata with schema                         1.00      4.0±0.01µs        ? ?/sec    1.01      4.1±0.02µs        ? ?/sec
decode metadata with skip PES                       1.00      6.9±0.03µs        ? ?/sec    1.02      7.0±0.07µs        ? ?/sec
decode metadata with skip column stats              1.00      6.7±0.03µs        ? ?/sec    1.01      6.7±0.02µs        ? ?/sec
decode metadata with stats mask                     1.00      6.8±0.03µs        ? ?/sec    1.02      6.9±0.01µs        ? ?/sec
decode parquet metadata                             1.00      7.0±0.02µs        ? ?/sec    1.03      7.3±0.02µs        ? ?/sec
decode parquet metadata (wide)                      1.00     29.1±0.48ms        ? ?/sec    1.01     29.4±0.46ms        ? ?/sec
decode parquet metadata no path_in_schema (wide)    1.00     28.2±0.49ms        ? ?/sec    1.02     28.8±0.49ms        ? ?/sec
decode parquet metadata w/ size stats (wide)        1.00     35.8±0.38ms        ? ?/sec    1.01     36.0±0.32ms        ? ?/sec
open(default)                                       1.00      7.7±0.03µs        ? ?/sec    1.02      7.9±0.05µs        ? ?/sec
open(page index)                                    1.00    133.1±0.12µs        ? ?/sec    1.00    132.8±0.37µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 152.0s
CPU sys 0.8s
Peak spill 0 B

branch

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 152.7s
CPU sys 0.2s
Peak spill 0 B

File an issue against this benchmark runner

@etseidl

etseidl commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark metadata

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4425693420-16-dslmw 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing thrift_bool (00326ea) to 7abb225 (merge-base) diff
BENCH_NAME=metadata
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadata
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                               main                                   thrift_bool
-----                                               ----                                   -----------
decode metadata (wide) with schema                  1.00     27.2±0.48ms        ? ?/sec    1.02     27.7±0.47ms        ? ?/sec
decode metadata (wide) with skip PES                1.00     26.7±0.38ms        ? ?/sec    1.02     27.4±0.33ms        ? ?/sec
decode metadata (wide) with skip all stats          1.00     28.5±0.50ms        ? ?/sec    1.02     29.1±0.40ms        ? ?/sec
decode metadata (wide) with skip column stats       1.00     27.6±0.41ms        ? ?/sec    1.03     28.4±0.36ms        ? ?/sec
decode metadata (wide) with skip size stats         1.00     30.8±0.46ms        ? ?/sec    1.02     31.3±0.40ms        ? ?/sec
decode metadata (wide) with stats mask              1.00     26.9±0.49ms        ? ?/sec    1.02     27.4±0.40ms        ? ?/sec
decode metadata with schema                         1.00      4.0±0.02µs        ? ?/sec    1.02      4.1±0.02µs        ? ?/sec
decode metadata with skip PES                       1.00      6.8±0.07µs        ? ?/sec    1.00      6.8±0.01µs        ? ?/sec
decode metadata with skip column stats              1.01      6.7±0.02µs        ? ?/sec    1.00      6.7±0.02µs        ? ?/sec
decode metadata with stats mask                     1.00      6.8±0.07µs        ? ?/sec    1.02      6.9±0.03µs        ? ?/sec
decode parquet metadata                             1.00      7.0±0.02µs        ? ?/sec    1.03      7.2±0.02µs        ? ?/sec
decode parquet metadata (wide)                      1.00     29.2±0.49ms        ? ?/sec    1.02     29.7±0.46ms        ? ?/sec
decode parquet metadata no path_in_schema (wide)    1.00     28.3±0.43ms        ? ?/sec    1.02     28.8±0.44ms        ? ?/sec
decode parquet metadata w/ size stats (wide)        1.00     35.8±0.41ms        ? ?/sec    1.01     36.3±0.37ms        ? ?/sec
open(default)                                       1.00      7.6±0.02µs        ? ?/sec    1.02      7.8±0.03µs        ? ?/sec
open(page index)                                    1.00    133.1±0.15µs        ? ?/sec    1.00    132.6±0.40µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 151.4s
CPU sys 0.8s
Peak spill 0 B

branch

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 153.5s
CPU sys 0.2s
Peak spill 0 B

File an issue against this benchmark runner

@etseidl

etseidl commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark metadata

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4426738697-17-xj782 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing thrift_bool (99de981) to 7abb225 (merge-base) diff
BENCH_NAME=metadata
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadata
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                               main                                   thrift_bool
-----                                               ----                                   -----------
decode metadata (wide) with schema                  1.00     26.4±0.47ms        ? ?/sec    1.02     26.8±0.26ms        ? ?/sec
decode metadata (wide) with skip PES                1.00     26.1±0.43ms        ? ?/sec    1.05     27.4±0.24ms        ? ?/sec
decode metadata (wide) with skip all stats          1.00     28.0±0.36ms        ? ?/sec    1.08     30.3±0.25ms        ? ?/sec
decode metadata (wide) with skip column stats       1.00     27.2±0.40ms        ? ?/sec    1.04     28.2±0.27ms        ? ?/sec
decode metadata (wide) with skip size stats         1.00     30.3±0.48ms        ? ?/sec    1.02     30.8±0.26ms        ? ?/sec
decode metadata (wide) with stats mask              1.00     26.0±0.41ms        ? ?/sec    1.02     26.4±0.22ms        ? ?/sec
decode metadata with schema                         1.00      4.0±0.01µs        ? ?/sec    1.04      4.2±0.01µs        ? ?/sec
decode metadata with skip PES                       1.00      6.9±0.01µs        ? ?/sec    1.03      7.1±0.01µs        ? ?/sec
decode metadata with skip column stats              1.00      6.7±0.07µs        ? ?/sec    1.01      6.8±0.01µs        ? ?/sec
decode metadata with stats mask                     1.00      6.8±0.01µs        ? ?/sec    1.03      7.0±0.04µs        ? ?/sec
decode parquet metadata                             1.00      7.1±0.02µs        ? ?/sec    1.02      7.3±0.01µs        ? ?/sec
decode parquet metadata (wide)                      1.00     28.3±0.48ms        ? ?/sec    1.02     28.9±0.31ms        ? ?/sec
decode parquet metadata no path_in_schema (wide)    1.00     27.6±0.48ms        ? ?/sec    1.02     28.3±0.30ms        ? ?/sec
decode parquet metadata w/ size stats (wide)        1.00     35.5±0.43ms        ? ?/sec    1.00     35.3±0.21ms        ? ?/sec
open(default)                                       1.00      7.7±0.03µs        ? ?/sec    1.03      7.9±0.02µs        ? ?/sec
open(page index)                                    1.23    133.2±0.11µs        ? ?/sec    1.00    108.6±0.07µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 150.7s
CPU sys 0.7s
Peak spill 0 B

branch

Metric Value
Wall time 155.0s
Peak memory 4.3 GiB
Avg memory 4.2 GiB
CPU user 152.1s
CPU sys 0.2s
Peak spill 0 B

File an issue against this benchmark runner

@jhorstmann

Copy link
Copy Markdown
Contributor

I ran the benchmarks locally on my machine (Intel Tigerlake), and this branch seems to be around 5% faster on all metadata benchmarks, compared to main.

@etseidl

etseidl commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

I ran the benchmarks locally on my machine (Intel Tigerlake), and this branch seems to be around 5% faster on all metadata benchmarks, compared to main.

Same, but all on intel as well. I've been playing around on godbolt and honestly do not understand why there's any difference at all. However I write read_field_begin it always boils down to:

    let field_type = self.read_byte()?;
    if field_type == 0 {
       // exit early
    } else if field_type < 16 { // unlikely
       // read full i16 field_id and return
    } else {
       // compute field_id from delta and return
    }

Lacking an aarch64 machine to profile on, it's hard to see why the benchmarks here are so different. It's possible that the difference comes from either the new bool_val() function or some quirk in the error handling.

@etseidl

etseidl commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark metadata

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4445185505-49-9dv7c 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing thrift_bool (876fc37) to 1ffd202 (merge-base) diff
BENCH_NAME=metadata
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadata
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                               main                                   thrift_bool
-----                                               ----                                   -----------
decode metadata (wide) with schema                  1.00     25.9±0.42ms        ? ?/sec    1.03     26.7±0.30ms        ? ?/sec
decode metadata (wide) with skip PES                1.00     25.8±0.28ms        ? ?/sec    1.05     27.0±0.17ms        ? ?/sec
decode metadata (wide) with skip all stats          1.00     28.2±0.41ms        ? ?/sec    1.07     30.2±0.33ms        ? ?/sec
decode metadata (wide) with skip column stats       1.00     26.8±0.38ms        ? ?/sec    1.06     28.3±0.34ms        ? ?/sec
decode metadata (wide) with skip size stats         1.00     30.0±0.36ms        ? ?/sec    1.01     30.4±0.18ms        ? ?/sec
decode metadata (wide) with stats mask              1.00     25.7±0.34ms        ? ?/sec    1.02     26.3±0.24ms        ? ?/sec
decode metadata with schema                         1.00      4.1±0.02µs        ? ?/sec    1.04      4.2±0.01µs        ? ?/sec
decode metadata with skip PES                       1.00      6.8±0.05µs        ? ?/sec    1.03      7.1±0.05µs        ? ?/sec
decode metadata with skip column stats              1.00      6.7±0.08µs        ? ?/sec    1.03      6.9±0.04µs        ? ?/sec
decode metadata with stats mask                     1.00      6.8±0.07µs        ? ?/sec    1.02      6.9±0.04µs        ? ?/sec
decode parquet metadata                             1.00      7.1±0.03µs        ? ?/sec    1.02      7.2±0.01µs        ? ?/sec
decode parquet metadata (wide)                      1.00     28.0±0.36ms        ? ?/sec    1.03     28.9±0.37ms        ? ?/sec
decode parquet metadata no path_in_schema (wide)    1.00     27.2±0.33ms        ? ?/sec    1.03     27.9±0.26ms        ? ?/sec
decode parquet metadata w/ size stats (wide)        1.00     35.1±0.40ms        ? ?/sec    1.00     35.1±0.18ms        ? ?/sec
open(default)                                       1.00      7.7±0.09µs        ? ?/sec    1.02      7.9±0.01µs        ? ?/sec
open(page index)                                    1.00    132.9±0.19µs        ? ?/sec    1.00    132.9±0.09µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 4.2 GiB
Avg memory 4.2 GiB
CPU user 149.7s
CPU sys 0.7s
Peak spill 0 B

branch

Metric Value
Wall time 155.0s
Peak memory 4.2 GiB
Avg memory 4.2 GiB
CPU user 151.9s
CPU sys 0.2s
Peak spill 0 B

File an issue against this benchmark runner

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is fine and we have done enough diligence

I can turn an agent loose to try and test on an aarch machine and figure out what is going on. However, this seems perhaps unecessary

@etseidl

etseidl commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @alamb. I'll see if I can hunt up some AWS time and see if this is really a thing on ARM.

@alamb

alamb commented May 14, 2026

Copy link
Copy Markdown
Contributor

Thanks @alamb. I'll see if I can hunt up some AWS time and see if this is really a thing on ARM.

I can provide access to an AWS machine -- DM or email me a public SSH key and i'll setup one for you to test on

@etseidl

etseidl commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @alamb. I'll see if I can hunt up some AWS time and see if this is really a thing on ARM.

I can provide access to an AWS machine -- DM or email me a public SSH key and i'll setup one for you to test on

Ooh, awesome! Thanks! Just sent you one via email.

@etseidl

etseidl commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

Running manually on an ARM instance

group                                               branch                                 branch2                                main2
-----                                               ------                                 -------                                -----
decode metadata (wide) with schema                  1.02     26.4±0.51ms        ? ?/sec    1.00     26.0±0.43ms        ? ?/sec    1.03     26.8±0.54ms        ? ?/sec
decode metadata (wide) with skip PES                1.02     26.6±0.78ms        ? ?/sec    1.09     28.3±0.39ms        ? ?/sec    1.00     26.0±0.56ms        ? ?/sec
decode metadata (wide) with skip all stats          1.12     32.4±0.26ms        ? ?/sec    1.02     29.6±0.44ms        ? ?/sec    1.00     28.9±0.46ms        ? ?/sec
decode metadata (wide) with skip column stats       1.03     28.9±0.32ms        ? ?/sec    1.00     28.1±0.49ms        ? ?/sec    1.01     28.3±0.45ms        ? ?/sec
decode metadata (wide) with skip size stats         1.07     31.7±0.43ms        ? ?/sec    1.00     29.7±0.49ms        ? ?/sec    1.04     30.7±0.68ms        ? ?/sec
decode metadata (wide) with stats mask              1.02     25.8±0.56ms        ? ?/sec    1.00     25.2±0.42ms        ? ?/sec    1.03     26.0±0.50ms        ? ?/sec
decode metadata with schema                         1.02      4.1±0.01µs        ? ?/sec    1.02      4.1±0.01µs        ? ?/sec    1.00      4.0±0.02µs        ? ?/sec
decode metadata with skip PES                       1.00      6.9±0.04µs        ? ?/sec    1.00      7.0±0.01µs        ? ?/sec    1.00      6.9±0.04µs        ? ?/sec
decode metadata with skip column stats              1.00      6.8±0.02µs        ? ?/sec    1.01      6.9±0.09µs        ? ?/sec    1.01      6.9±0.04µs        ? ?/sec
decode metadata with stats mask                     1.00      6.9±0.05µs        ? ?/sec    1.00      6.9±0.02µs        ? ?/sec    1.01      6.9±0.04µs        ? ?/sec
decode parquet metadata                             1.00      7.1±0.02µs        ? ?/sec    1.00      7.2±0.02µs        ? ?/sec    1.01      7.2±0.04µs        ? ?/sec
decode parquet metadata (wide)                      1.03     28.7±0.47ms        ? ?/sec    1.00     27.8±0.35ms        ? ?/sec    1.05     29.2±0.53ms        ? ?/sec
decode parquet metadata no path_in_schema (wide)    1.04     28.4±0.54ms        ? ?/sec    1.00     27.3±0.54ms        ? ?/sec    1.03     28.2±0.49ms        ? ?/sec
decode parquet metadata w/ size stats (wide)        1.04     35.6±0.42ms        ? ?/sec    1.00     34.3±0.44ms        ? ?/sec    1.04     35.6±0.49ms        ? ?/sec
open(default)                                       1.00      7.8±0.05µs        ? ?/sec    1.00      7.8±0.02µs        ? ?/sec    1.00      7.8±0.04µs        ? ?/sec
open(page index)                                    1.00    132.0±0.22µs        ? ?/sec    1.00    132.0±0.18µs        ? ?/sec    1.00    132.0±0.23µs        ? ?/sec

picked the best run of the current main branch vs 2 runs of this branch. I think we can conclude it's just noise, and if there is a difference it's not really showing up strongly (although on x86 there's a definite advantage to this branch).

Thanks @alamb!

@alamb

alamb commented May 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for the diligence everyone. This is great

@alamb
alamb merged commit 30185d6 into apache:main May 15, 2026
16 checks passed
@etseidl
etseidl deleted the thrift_bool branch May 15, 2026 15:20
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Jun 2, 2026
…#9945)

# Which issue does this PR close?

- Closes apache#9946.

# Rationale for this change
Remove some unnecessary branching from a hot path in the Thrift parser,
improving performance and making for easier to read code.

# What changes are included in this PR?
Removes the `bool_val` field from `FieldIdentifier`.

# Are these changes tested?
Covered by existing tests

# Are there any user-facing changes?
No, this is an internal-only API
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 performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: Rework Parquet Thrift handling of boolean fields

4 participants