You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/08 13:08:34 UTC

[GitHub] [arrow] cyb70289 commented on a change in pull request #11896: ARROW-15005: [C++] Improve csv parser with Neon

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



##########
File path: cpp/src/arrow/csv/parser.cc
##########
@@ -184,6 +184,31 @@ class SSE42Filter {
   const BulkFilterType filter_;
 };
 
+#elif defined ARROW_HAVE_NEON
+
+// NEON filter: 8 bytes at a time, comparing with all special chars
+
+class NeonFilter {
+ public:
+  using WordType = uint8x8_t;
+
+  explicit NeonFilter(const ParseOptions& options)
+      : delim_(vdup_n_u8(options.delimiter)),
+        quote_(vdup_n_u8(options.quoting ? options.quote_char : '\n')),
+        escape_(vdup_n_u8(options.escaping ? options.escape_char : '\n')) {}
+
+  bool Matches(WordType w) {
+    const uint8x8_t v = vceq_u8(w, vdup_n_u8('\r')) | vceq_u8(w, vdup_n_u8('\n')) |
+                        vceq_u8(w, delim_) | vceq_u8(w, quote_) | vceq_u8(w, escape_);

Review comment:
       Good idea. Will try.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org