You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2021/08/26 12:02:00 UTC
[jira] [Resolved] (ARROW-8022) [C++] Provide or Vendor a
small_vector implementation
[ https://issues.apache.org/jira/browse/ARROW-8022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Pitrou resolved ARROW-8022.
-----------------------------------
Fix Version/s: 6.0.0
Resolution: Fixed
Issue resolved by pull request 10915
[https://github.com/apache/arrow/pull/10915]
> [C++] Provide or Vendor a small_vector implementation
> -----------------------------------------------------
>
> Key: ARROW-8022
> URL: https://issues.apache.org/jira/browse/ARROW-8022
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Affects Versions: 0.16.0
> Reporter: Ben Kietzman
> Assignee: Antoine Pitrou
> Priority: Major
> Labels: pull-request-available
> Fix For: 6.0.0
>
> Time Spent: 8h 10m
> Remaining Estimate: 0h
>
> {{small_vector<>}} is a C++ utility class which does not use heap allocation for small numbers of elements. [Folly|https://github.com/facebook/folly/blob/master/folly/docs/small_vector.md], [Boost|https://github.com/boostorg/container/blob/develop/include/boost/container/small_vector.hpp], [Abseil|https://github.com/abseil/abseil-cpp/blob/master/absl/container/inlined_vector.h], and [LLVM|https://llvm.org/doxygen/classllvm_1_1SmallVector.html] each provide one.
> In many cases a vector usually has few elements but might have many. If we use std::vector we have to bother the allocator unless the vector is actually empty. My specific use case for this is field lookup by name: I expect that most schemas will have unique field names, but strictly speaking we support duplicate field names. It would be ideal not incur a performance penalty for 99.9% of field lookups which yield 0 or 1 fields just to accommodate the case where there may be multiple.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)