Commit 13d497a
perf: improve calculating length performance for nested arrays in row conversion (#9079)
# Which issue does this PR close?
N/A
# Rationale for this change
Making the row length calculation faster which result in faster row
conversion
# What changes are included in this PR?
1. Instead of iterating over the rows and getting the length from the
byte slice, we use the offsets directly, this
2. Added 3 new APIs for `Rows` (explained below)
# Are these changes tested?
Yes
# Are there any user-facing changes?
Yes, added 3 functions to `Rows`:
- `row_len` - get the row length at index
- `row_len_unchecked` - get the row length at index without bound checks
- `lengths` - get iterator over the lengths of the rows
-----
Related to:
- #9078
- #9080
---------
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>1 parent f445bfc commit 13d497a
3 files changed
+82
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
| |||
1118 | 1120 | | |
1119 | 1121 | | |
1120 | 1122 | | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1121 | 1126 | | |
1122 | 1127 | | |
1123 | 1128 | | |
| |||
1156 | 1161 | | |
1157 | 1162 | | |
1158 | 1163 | | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
1159 | 1177 | | |
1160 | 1178 | | |
1161 | 1179 | | |
| |||
1563 | 1581 | | |
1564 | 1582 | | |
1565 | 1583 | | |
1566 | | - | |
| 1584 | + | |
1567 | 1585 | | |
1568 | 1586 | | |
1569 | 1587 | | |
| |||
1574 | 1592 | | |
1575 | 1593 | | |
1576 | 1594 | | |
1577 | | - | |
| 1595 | + | |
1578 | 1596 | | |
1579 | 1597 | | |
1580 | 1598 | | |
| |||
1626 | 1644 | | |
1627 | 1645 | | |
1628 | 1646 | | |
1629 | | - | |
| 1647 | + | |
1630 | 1648 | | |
1631 | 1649 | | |
1632 | | - | |
| 1650 | + | |
1633 | 1651 | | |
1634 | 1652 | | |
1635 | 1653 | | |
| |||
3699 | 3717 | | |
3700 | 3718 | | |
3701 | 3719 | | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
3702 | 3752 | | |
3703 | 3753 | | |
3704 | 3754 | | |
| |||
4351 | 4401 | | |
4352 | 4402 | | |
4353 | 4403 | | |
| 4404 | + | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
| 4409 | + | |
| 4410 | + | |
| 4411 | + | |
| 4412 | + | |
4354 | 4413 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | 30 | | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments