gabotechs commented on code in PR #12083:
URL: https://github.com/apache/arrow-rs/pull/12083#discussion_r4482302389
##########
arrow-ipc/benches/ipc_writer.rs:
##########
@@ -81,6 +81,34 @@ fn criterion_benchmark(c: &mut Criterion) {
})
});
+ for (rows, threads) in [(8192, 1), (65536, 1), (8192, 16), (65536, 16)] {
+ group.bench_function(
+
format!("StreamEncoder/encode_10/lz4/rows={rows}/threads={threads}"),
+ |b| {
+ let batch = create_batch(rows, true);
+ b.iter(|| {
+ std::thread::scope(|s| {
+ for _ in 0..threads {
+ s.spawn(|| {
+ let options = IpcWriteOptions::default()
+
.try_with_compression(Some(CompressionType::LZ4_FRAME))
+ .unwrap();
+ let mut encoder =
StreamEncoder::try_new_with_options(
+ batch.schema().as_ref(),
+ options,
+ )
+ .unwrap();
+ for _ in 0..10 {
+ black_box(encoder.encode(&batch).unwrap());
Review Comment:
During benchmarks in https://github.com/apache/arrow-rs/pull/12084, the
multithreaded cases are the ones that show the biggest improvements
--
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]