[ https://issues.apache.org/jira/browse/ARROW-7051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470513#comment-17470513 ]
Antoine Pitrou commented on ARROW-7051: --------------------------------------- Well... we could do system-specific optimizations, but I'm not sure it's useful to go to that level of optimization. Also, as a counter-argument, note that {{mmap}} and {{munmap}} are system calls, so they have a non-trivial overhead: calling them on each buffer allocation would be counter-productive. {{calloc}} may give better results (or not). If we do implement your idea, then it should be hidden behind an abstraction, for example on {{MemoryPool}}. > [C++] Improve MakeArrayOfNull to support creation of multiple arrays > -------------------------------------------------------------------- > > Key: ARROW-7051 > URL: https://issues.apache.org/jira/browse/ARROW-7051 > Project: Apache Arrow > Issue Type: Improvement > Components: C++ > Affects Versions: 0.14.0 > Reporter: Ben Kietzman > Assignee: Jeroen van Straten > Priority: Minor > Labels: beginner, good-first-issue > Time Spent: 1h 40m > Remaining Estimate: 0h > > MakeArrayOfNull reuses a single buffer of {{0}} for all buffers in the array > it creates. It could be extended to reuse that same buffer for all buffers in > multiple arrays. This optimization will make RecordBatchProjector and > ConcatenateTablesWithPromotion more memory efficient -- This message was sent by Atlassian Jira (v8.20.1#820001)