cyb70289 commented on a change in pull request #12504:
URL: https://github.com/apache/arrow/pull/12504#discussion_r813509167



##########
File path: cpp/src/arrow/csv/writer.cc
##########
@@ -81,7 +81,15 @@ RecordBatchIterator RecordBatchSliceIterator(const 
RecordBatch& batch,
 
 // Counts the number of quotes in s.
 int64_t CountQuotes(arrow::util::string_view s) {
-  return static_cast<int64_t>(std::count(s.begin(), s.end(), '"'));
+  // std::count uses 64 bit counter, not necessary for StringType
+  // 32 bit counter performs much better

Review comment:
       Probably due to more efficient using of simd registers.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to