jturkel opened a new pull request #1037:
URL: https://github.com/apache/avro/pull/1037


   This optimizes several bottlenecks when encoding unions in the Avro Ruby
   library:
   
   1) Validation calls repeatedly allocate constant hashes
   2) Validation calls repeatedly allocate constant strings
   3) Validation calls are expensive and can be avoided when determining
      of a datum matches a null union member type (a common pattern for
      "optional" fields)
   
   Optimizing these codepaths reduces memory allocations by 78% and
   improves throughput 1.9X in our encoding benchmarks.
   
   Note: Encoding unions is still expensive because the code must
   determine which member of the union a datum is targeting. Allowing
   clients to explicitly specify this would speed up serialization even
   further but that requires a larger API change.
   
   /cc @tjwp 


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to