You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Sameera Wijerathne (JIRA)" <ji...@apache.org> on 2018/10/08 09:59:00 UTC
[jira] [Commented] (AVRO-2037) Use std::any where available
[ https://issues.apache.org/jira/browse/AVRO-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16641603#comment-16641603 ]
Sameera Wijerathne commented on AVRO-2037:
------------------------------------------
Hi,
I'm having the same performance issue. As you can see in below VTune output, usage of boost:any makes performance of Avro C++ very poor. This is really disappointing when Avro C++ version's performance becomes poor. Highly appreciate if someone can look into this.
!image-2018-10-08-15-24-52-340.png!
> Use std::any where available
> ----------------------------
>
> Key: AVRO-2037
> URL: https://issues.apache.org/jira/browse/AVRO-2037
> Project: Avro
> Issue Type: Improvement
> Components: c++
> Reporter: Darryl Green
> 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)