kou commented on PR #50568:
URL: https://github.com/apache/arrow/pull/50568#issuecomment-5054637476
> I used the following to measure `IntegrationJsonWriter::WriteRecordBatch()
+ Finish()` on a 1M-row `RecordBatch`:
Thanks. I also tried it.
simdjson: 69 ms
RapidJSON: 65 ms
Is RapidJSON fast enough? Is simdjson not fast?
Can we try naive `std::ostringstream` implementation something like the
following?
```cpp
namespace arrow::json {
class ARROW_EXPORT JsonWriter {
// ...
private:
// ...
std::ostringstream output_;
// ...
};
}
namespace arrow::json {
void JsonWriter::StartObject() {
MaybeComma();
output_ << "{";
needs_comma_ = false;
}
// ...
```
If this performance is similar to simdjson/RapidJSON, they may not be so
fast for writing.
If this is slower than simdjson/RapidJSON, both of them are fast.
--
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]