Commit 8965b59
ARROW-11033 [Rust] Csv writing performance improvements
Some performance improvements for the csv writer
* Use lexical core for numeric types
* Allow setting batch size in convert (slightly faster reading when using higher batch size, could also be helpful in writing)
* Avoid allocation of vec
PR: `cargo run --release --bin tpch -- convert --input path --output ./output --format csv -s 20000`
Orders / lineitems:
```
Conversion completed in 2050 ms
Conversion completed in 16955 ms
```
Master `cargo run --release --bin tpch -- convert --input path --output ./output --format csv`
```
Conversion completed in 2336 ms
Conversion completed in 19070 ms
```
Closes #9010 from Dandandan/csv_write_perf
Lead-authored-by: Daniël Heres <danielheres@gmail.com>
Co-authored-by: Heres, Daniel <danielheres@gmail.com>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>1 parent 2f68741 commit 8965b59
2 files changed
Lines changed: 38 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
84 | | - | |
| 99 | + | |
85 | 100 | | |
86 | 101 | | |
87 | | - | |
| 102 | + | |
88 | 103 | | |
89 | 104 | | |
90 | 105 | | |
| |||
124 | 139 | | |
125 | 140 | | |
126 | 141 | | |
127 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
128 | 148 | | |
129 | | - | |
130 | | - | |
| 149 | + | |
131 | 150 | | |
132 | 151 | | |
133 | 152 | | |
134 | | - | |
| 153 | + | |
135 | 154 | | |
136 | 155 | | |
137 | 156 | | |
| |||
243 | 262 | | |
244 | 263 | | |
245 | 264 | | |
246 | | - | |
247 | | - | |
| 265 | + | |
248 | 266 | | |
249 | | - | |
| 267 | + | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
| |||
265 | 283 | | |
266 | 284 | | |
267 | 285 | | |
| 286 | + | |
| 287 | + | |
268 | 288 | | |
269 | | - | |
270 | | - | |
| 289 | + | |
| 290 | + | |
271 | 291 | | |
272 | 292 | | |
273 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
1019 | 1023 | | |
1020 | 1024 | | |
1021 | 1025 | | |
1022 | | - | |
| 1026 | + | |
| 1027 | + | |
1023 | 1028 | | |
1024 | 1029 | | |
1025 | 1030 | | |
| |||
0 commit comments