Skip to content

Commit

Permalink
oh. my. god.
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Mar 23, 2023
1 parent 8512de9 commit e4b3b3f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion crates/re_arrow_store/src/store_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,19 @@ impl DataStore {
(len, ClusterData::Cached(*row_idx))
} else {
// Cache miss! Craft a new instance keys from the ground up.
let cell = DataCell::from_component::<InstanceKey>(0..len as u64);

// TODO(cmc): That's exactly how one should create a cell of instance keys... but
// it turns out that running `TryIntoArrow` on a primitive type is orders of
// magnitude slower than manually creating the equivalent primitive array for some
// reason...
// let cell = DataCell::from_component::<InstanceKey>(0..len as u64);

// ...so we create it manually instead.
use re_log_types::msg_bundle::Component as _;
let values =
arrow2::array::UInt64Array::from_vec((0..len as u64).collect_vec()).boxed();
let cell = DataCell::from_arrow(InstanceKey::name(), values);

(len, ClusterData::GenData(cell))
}
};
Expand Down

1 comment on commit e4b3b3f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: e4b3b3f Previous: 1802c20 Ratio
datastore/insert/batch/rects/insert 614089 ns/iter (± 2416) 558040 ns/iter (± 2726) 1.10
datastore/latest_at/batch/rects/query 1824 ns/iter (± 6) 1869 ns/iter (± 5) 0.98
datastore/latest_at/missing_components/primary 288 ns/iter (± 0) 287 ns/iter (± 0) 1.00
datastore/latest_at/missing_components/secondaries 440 ns/iter (± 0) 456 ns/iter (± 0) 0.96
datastore/range/batch/rects/query 153826 ns/iter (± 158) 153037 ns/iter (± 237) 1.01
mono_points_arrow/generate_message_bundles 32857574 ns/iter (± 352090) 52357104 ns/iter (± 640637) 0.63
mono_points_arrow/generate_messages 131862660 ns/iter (± 1110638) 136205204 ns/iter (± 1313776) 0.97
mono_points_arrow/encode_log_msg 163843368 ns/iter (± 1506540) 171213456 ns/iter (± 1741778) 0.96
mono_points_arrow/encode_total 327400566 ns/iter (± 2168581) 362883755 ns/iter (± 2060012) 0.90
mono_points_arrow/decode_log_msg 180906592 ns/iter (± 869227) 189752854 ns/iter (± 4013520) 0.95
mono_points_arrow/decode_message_bundles 57162481 ns/iter (± 460991) 75254710 ns/iter (± 1140876) 0.76
mono_points_arrow/decode_total 232613540 ns/iter (± 1617777) 259499357 ns/iter (± 2333802) 0.90
batch_points_arrow/generate_message_bundles 332188 ns/iter (± 399) 341982 ns/iter (± 553) 0.97
batch_points_arrow/generate_messages 7030 ns/iter (± 15) 6228 ns/iter (± 13) 1.13
batch_points_arrow/encode_log_msg 362813 ns/iter (± 1853) 372885 ns/iter (± 1494) 0.97
batch_points_arrow/encode_total 717730 ns/iter (± 3591) 746449 ns/iter (± 4228) 0.96
batch_points_arrow/decode_log_msg 349026 ns/iter (± 2114) 354317 ns/iter (± 1692) 0.99
batch_points_arrow/decode_message_bundles 1592 ns/iter (± 5) 2018 ns/iter (± 8) 0.79
batch_points_arrow/decode_total 355120 ns/iter (± 1936) 360005 ns/iter (± 2070) 0.99
arrow_mono_points/insert 6344140269 ns/iter (± 15390499) 7101183936 ns/iter (± 48000479) 0.89
arrow_mono_points/query 1793398 ns/iter (± 20519) 1847772 ns/iter (± 25156) 0.97
arrow_batch_points/insert 3048903 ns/iter (± 18880) 2738045 ns/iter (± 81908) 1.11
arrow_batch_points/query 16674 ns/iter (± 30) 16152 ns/iter (± 40) 1.03
arrow_batch_vecs/insert 45581 ns/iter (± 115) 43144 ns/iter (± 226) 1.06
arrow_batch_vecs/query 390900 ns/iter (± 532) 389549 ns/iter (± 596) 1.00
tuid/Tuid::random 34 ns/iter (± 0) 34 ns/iter (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.