Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-8022

[C++] Provide or Vendor a small_vector implementation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.16.0
    • 6.0.0
    • C++

    Description

      small_vector<> is a C++ utility class which does not use heap allocation for small numbers of elements. Folly, Boost, Abseil, and LLVM 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.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h 20m
                  8h 20m