Yibo Cai created ARROW-15854:
--------------------------------

             Summary: [C++] Refine csv writer - populate columns in normal order
                 Key: ARROW-15854
                 URL: https://issues.apache.org/jira/browse/ARROW-15854
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Yibo Cai
            Assignee: Yibo Cai


CSV writer populates columns in reverse order, each row is constructed from 
last cell to first cell.
Populating columns in normal order makes the code easier to follow, and offers 
better optimization chances. E.g., EscapeReverse [1] is the hotspot for quoted 
string benchmark, it's hard to improve if chars are scanned in reverse order, 
but may benefit from simd if scanned in normal order.

[1] 
https://github.com/apache/arrow/blob/master/cpp/src/arrow/csv/writer.cc#L141-L150



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to