pixelherodev opened a new pull request, #542: URL: https://github.com/apache/arrow-go/pull/542
### Rationale for this change Reflection is slow. When working with primitive data types - e.g. PrimitiveType.Float64 - the DataType value is a constant consisting of the (constant) type indicator, and the constant pointer to the only instance of the Float64 type. For such cases, we can do a fast-path for TypeEqual and detect the interface equality. ### What changes are included in this PR? A branch is added to the TypeEqual switch, which returns early when the two types compare equal through shallow comparison. In such a case, deeper comparison must necessarily show equality, as every property is definitionally identical. Detecting this early can make e.g. schema validations significantly faster. ### Are these changes tested? Yes, though only with our internal schemas. I noticed arrow showing up heavily in our profiles and started hacking on it to make it go away :) ### Are there any user-facing changes? It runs faster? That's technically user-facing ;) -- 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]
