Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.16.0
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
- links to