Commit bac0cb5
authored
Small optimization in Parquet varint decoder (#8742)
# Which issue does this PR close?
- Part of #5853.
# Rationale for this change
Following the recent improvements in Thrift decoding, the percentage of
time spent decoding LEB128 encoded integers has increased.
# What changes are included in this PR?
This PR modifies the varint decoder to first test for integers that can
be encoded in a single byte (using zig-zag encoding, the maximum int
that can be encoded is 63). Many of the fields in the Parquet footer
(including all enum values) will be in this range, so optimizing for
this frequent occurrence makes sense.
# Are these changes tested?
Should be covered by existing tests
# Are there any user-facing changes?
No1 parent cd61ead commit bac0cb5
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
| |||
0 commit comments