spiridonov opened a new pull request, #645:
URL: https://github.com/apache/arrow-go/pull/645

   ### Rationale for this change
   
   `apache/arrow-go` is used in the new query engine in Grafana Loki and we are 
actively working on improving its performance. Here are few low hanging fruits 
that reduce allocations by many gigabytes when used on the hot path.
   
   ### What changes are included in this PR?
   
   This PR reduces amount of allocated objects.
   
   * `arrow/datatype_binary.go`: straightforward, those `Layout` objects are 
allocated on each call currently.
   * `arrow/schema.go`: `Schema.Fields()` does not return a clone anymore and 
`NewSchemaWithEndian()` does not clone inputs anymore. All call sites are 
func-signature compatible, but should not modify those args/results anymore. In 
our opinion this is a reasonable trade-off for higher performance. I am happy 
to discuss other ways to implement that.
   
   ### Are these changes tested?
   
   * Tested with the current `apache/arrow-go` unit test suite.
   * Tested with `grafana/loki` test suite for the query engine.
   
   ### Are there any user-facing changes?
   
   Yes. Explained above.


-- 
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]

Reply via email to