You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org> on 2018/12/29 03:26:00 UTC

[jira] [Resolved] (AVRO-2037) Use std::any where available

     [ https://issues.apache.org/jira/browse/AVRO-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. resolved AVRO-2037.
---------------------------------------
    Resolution: Fixed

Merged the pull request.

> Use std::any where available
> ----------------------------
>
>                 Key: AVRO-2037
>                 URL: https://issues.apache.org/jira/browse/AVRO-2037
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: c++
>            Reporter: Darryl Green
>            Assignee: Thiruvalluvan M. G.
>            Priority: Major
>
> The use of boost::any to hold union types causes a significant performance hit especially for small types - in particular the when using [null,primitive] for optional primitive type elements of a schema. Most (all?) implementations of std::any include a small value optimisation that avoids allocation overhead for scalars and other small types. Its a little unfortunate that the performance of a C++ binding of a notionally high performance serialization format performs so poorly in this case (note - I had previously proposed using boost::variant which would address this problem but would fail to support recursive types or truly huge numbers of distinct types in a union). Obviously this requires C++ 17 but could fall back to boost::any for older compilers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)