jhorstmann opened a new pull request #1975:
URL: https://github.com/apache/arrow-datafusion/pull/1975
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax. For example `Closes #123`
indicates that this PR will close issue #123.
-->
Closes #1973.
# Rationale for this change
Slightly improves the performance of writing rows.
# What changes are included in this PR?
To avoid cloning the `SchemaRef` we pass in the schema as a separate
parameter. I also marked the benchmark functions as `inline(never)` so that
they stand out more in the profiler, since they are operating on large chunks
of data this should not create any overhead.
Benchmark results on i7-10510U, run with `$ RUSTFLAGS="-C
target-cpu=skylake" cargo bench --features row,jit --bench jit`:
master branch:
```
row serializer time: [2.0518 s 2.0745 s 2.1029 s]
row serializer jit time: [1.8530 s 1.8626 s 1.8723 s]
```
this branch:
```
row serializer time: [1.6923 s 1.7042 s 1.7161 s]
row serializer jit time: [1.8468 s 1.8562 s 1.8657 s]
```
If I understand the code correctly then the jit calls the same
`write_field_xyz` functions as the rust version and is not able to inline these
functions. So it avoids the type dispatch, but instead has several more
function calls than the rust code (which is able to inline some of the
`write_field` functions).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]