Commit 8f4cb19
committed
ALP: Pre-allocate long[] encoded buffer for double vector decodes
Reuse encoded long[] buffer across double vector decompression calls
instead of allocating new long[1024] per vector. Buffer is allocated
once in initFromPage and passed through to decompressDoubleVector.
Float decode is intentionally left unchanged — JVM escape analysis
produces better code when int[] is allocated fresh per vector call.1 parent 05996ba commit 8f4cb19
2 files changed
Lines changed: 13 additions & 3 deletions
File tree
- parquet-column/src/main/java/org/apache/parquet/column/values/alp
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
402 | 406 | | |
403 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
404 | 412 | | |
405 | 413 | | |
406 | 414 | | |
407 | | - | |
| 415 | + | |
408 | 416 | | |
409 | 417 | | |
410 | 418 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | | - | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
0 commit comments