Skip to content

Commit

Permalink
privatize Table::row_layout + related BTreeIndex refactoring (#1262)
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril authored May 20, 2024
1 parent 91f7e8c commit ebc9218
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use spacetimedb_sats::{
};
use spacetimedb_table::{
blob_store::{BlobStore, HashMapBlobStore},
btree_index::BTreeIndex,
indexes::{RowPointer, SquashedOffset},
table::{IndexScanIter, InsertError, RowRef, Table},
};
Expand Down Expand Up @@ -302,14 +301,8 @@ impl CommittedState {
let Some((table, blob_store)) = self.get_table_and_blob_store(index_row.table_id) else {
panic!("Cannot create index for table which doesn't exist in committed state");
};
let mut index = BTreeIndex::new(
index_row.index_id,
table.row_layout(),
&index_row.columns,
index_row.is_unique,
)?;
index.build_from_rows(&index_row.columns, table.scan_rows(blob_store))?;
table.indexes.insert(index_row.columns, index);
let index = table.new_index(index_row.index_id, &index_row.columns, index_row.is_unique)?;
table.insert_index(blob_store, index_row.columns, index);
}
Ok(())
}
Expand Down
3 changes: 1 addition & 2 deletions crates/core/src/db/datastore/locking_tx_datastore/mut_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use spacetimedb_sats::{
AlgebraicValue, ProductType, ProductValue,
};
use spacetimedb_table::{
btree_index::BTreeIndex,
indexes::{RowPointer, SquashedOffset},
table::{InsertError, RowRef, Table},
};
Expand Down Expand Up @@ -325,7 +324,7 @@ impl MutTxId {
self.tx_state.get_table_and_blob_store(table_id).unwrap()
};

let mut insert_index = BTreeIndex::new(index.index_id, table.row_layout(), &index.columns, index.is_unique)?;
let mut insert_index = table.new_index(index.index_id, &index.columns, index.is_unique)?;
insert_index.build_from_rows(&index.columns, table.scan_rows(blob_store))?;

// NOTE: Also add all the rows in the already committed table to the index.
Expand Down
3 changes: 1 addition & 2 deletions crates/table/benches/page_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use spacetimedb_primitives::{ColList, IndexId, TableId};
use spacetimedb_sats::db::def::{TableDef, TableSchema};
use spacetimedb_sats::{AlgebraicType, AlgebraicValue, ProductType, ProductValue};
use spacetimedb_table::blob_store::NullBlobStore;
use spacetimedb_table::btree_index::BTreeIndex;
use spacetimedb_table::indexes::Byte;
use spacetimedb_table::indexes::{Bytes, PageOffset, RowPointer, Size, SquashedOffset, PAGE_DATA_SIZE};
use spacetimedb_table::layout::{row_size_for_bytes, row_size_for_type};
Expand Down Expand Up @@ -693,7 +692,7 @@ fn make_table_with_indexes<R: IndexedRow>() -> Table {
let mut tbl = Table::new(schema.into(), SquashedOffset::COMMITTED_STATE);

let cols = R::indexed_columns();
let idx = BTreeIndex::new(IndexId(0), &R::row_type().into(), &cols, false).unwrap();
let idx = tbl.new_index(IndexId(0), &cols, false).unwrap();
tbl.insert_index(&NullBlobStore, cols, idx);

tbl
Expand Down
6 changes: 3 additions & 3 deletions crates/table/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

pub mod bflatn_from;
pub mod bflatn_to;
pub mod bflatn_to_bsatn_fast_path;
mod bflatn_to_bsatn_fast_path;
pub mod blob_store;
pub mod btree_index;
mod btree_index;
pub mod eq;
pub mod eq_to_pv;
mod eq_to_pv;
mod fixed_bit_set;
pub mod indexes;
pub mod layout;
Expand Down
29 changes: 16 additions & 13 deletions crates/table/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use core::hash::{Hash, Hasher};
use core::ops::RangeBounds;
use core::{fmt, ptr};
use spacetimedb_data_structures::map::HashMap;
use spacetimedb_primitives::{ColId, ColList};
use spacetimedb_primitives::{ColId, ColList, IndexId};
use spacetimedb_sats::{
algebraic_value::ser::ValueSerializer,
bsatn::{self, ser::BsatnError},
Expand Down Expand Up @@ -56,12 +56,6 @@ pub struct Table {
pub row_count: u64,
}

impl Table {
pub fn row_layout(&self) -> &RowTypeLayout {
&self.inner.row_layout
}
}

/// The part of a `Table` concerned only with storing rows.
///
/// Separated from the "outer" parts of `Table`, especially the `indexes`,
Expand Down Expand Up @@ -517,8 +511,15 @@ impl Table {
self.schema = schema;
}

/// Returns a new [`BTreeIndex`] for `table`.
pub fn new_index(&self, id: IndexId, cols: &ColList, is_unique: bool) -> Result<BTreeIndex, InvalidFieldError> {
BTreeIndex::new(id, self.row_layout(), cols, is_unique)
}

/// Inserts a new `index` into the table.
///
/// The index will be populated using the rows of the table.
/// Panics if `cols` has some column that is out of bounds of the table's row layout.
pub fn insert_index(&mut self, blob_store: &dyn BlobStore, cols: ColList, mut index: BTreeIndex) {
index.build_from_rows(&cols, self.scan_rows(blob_store)).unwrap();
self.indexes.insert(cols, index);
Expand Down Expand Up @@ -570,11 +571,8 @@ impl Table {
for (cols, index) in self.indexes.iter() {
// `new` is known to be empty (we just constructed it!),
// so no need for an actual blob store here.
new.insert_index(
&NullBlobStore,
cols.clone(),
BTreeIndex::new(index.index_id, &self.inner.row_layout, cols, index.is_unique).unwrap(),
);
let index = new.new_index(index.index_id, cols, index.is_unique).unwrap();
new.insert_index(&NullBlobStore, cols.clone(), index);
}
new
}
Expand Down Expand Up @@ -1003,6 +1001,11 @@ impl Table {
self.inner.row_layout.size()
}

/// Returns the layout for a row in the table.
fn row_layout(&self) -> &RowTypeLayout {
&self.inner.row_layout
}

/// Returns the pages storing the physical rows of this table.
fn pages(&self) -> &Pages {
&self.inner.pages
Expand Down Expand Up @@ -1056,7 +1059,7 @@ pub(crate) mod test {
let mut table = Table::new(schema.into(), SquashedOffset::COMMITTED_STATE);
let cols = ColList::new(0.into());

let index = BTreeIndex::new(index_schema.index_id, &table.inner.row_layout, &cols, true).unwrap();
let index = table.new_index(index_schema.index_id, &cols, true).unwrap();
table.insert_index(&NullBlobStore, cols, index);

// Reserve a page so that we can check the hash.
Expand Down

2 comments on commit ebc9218

@github-actions
Copy link

@github-actions github-actions bot commented on ebc9218 May 20, 2024

Choose a reason for hiding this comment

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

Criterion benchmark results

Criterion benchmark report

YOU SHOULD PROBABLY IGNORE THESE RESULTS.

Criterion is a wall time based benchmarking system that is extremely noisy when run on CI. We collect these results for longitudinal analysis, but they are not reliable for comparing individual PRs.

Go look at the callgrind report instead.

empty

db on disk new latency old latency new throughput old throughput
sqlite 💿 426.1±1.94ns 425.0±3.48ns - -
sqlite 🧠 416.0±1.12ns 417.6±2.59ns - -
stdb_raw 💿 747.9±0.59ns 745.4±0.68ns - -
stdb_raw 🧠 717.6±0.62ns 713.9±1.81ns - -

insert_1

db on disk schema indices preload new latency old latency new throughput old throughput

insert_bulk

db on disk schema indices preload count new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str btree_each_column 2048 256 522.5±38.04µs 536.1±61.82µs 1913 tx/sec 1865 tx/sec
sqlite 💿 u32_u64_str unique_0 2048 256 133.5±0.90µs 132.3±1.03µs 7.3 Ktx/sec 7.4 Ktx/sec
sqlite 💿 u32_u64_u64 btree_each_column 2048 256 418.8±0.52µs 418.1±0.38µs 2.3 Ktx/sec 2.3 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 2048 256 124.2±0.46µs 121.4±0.75µs 7.9 Ktx/sec 8.0 Ktx/sec
sqlite 🧠 u32_u64_str btree_each_column 2048 256 441.9±2.75µs 445.6±0.50µs 2.2 Ktx/sec 2.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 2048 256 119.4±0.40µs 119.6±0.71µs 8.2 Ktx/sec 8.2 Ktx/sec
sqlite 🧠 u32_u64_u64 btree_each_column 2048 256 362.9±0.91µs 364.9±0.58µs 2.7 Ktx/sec 2.7 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 2048 256 105.3±0.11µs 103.7±1.00µs 9.3 Ktx/sec 9.4 Ktx/sec
stdb_raw 💿 u32_u64_str btree_each_column 2048 256 510.4±8.21µs 513.0±22.01µs 1959 tx/sec 1949 tx/sec
stdb_raw 💿 u32_u64_str unique_0 2048 256 496.5±23.53µs 510.0±21.58µs 2014 tx/sec 1960 tx/sec
stdb_raw 💿 u32_u64_u64 btree_each_column 2048 256 403.0±7.06µs 400.1±16.58µs 2.4 Ktx/sec 2.4 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 2048 256 377.2±7.35µs 367.3±21.23µs 2.6 Ktx/sec 2.7 Ktx/sec
stdb_raw 🧠 u32_u64_str btree_each_column 2048 256 338.9±0.32µs 340.2±0.15µs 2.9 Ktx/sec 2.9 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 2048 256 262.5±0.41µs 264.1±0.26µs 3.7 Ktx/sec 3.7 Ktx/sec
stdb_raw 🧠 u32_u64_u64 btree_each_column 2048 256 278.8±0.12µs 280.8±0.12µs 3.5 Ktx/sec 3.5 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 2048 256 245.5±0.52µs 246.5±0.24µs 4.0 Ktx/sec 4.0 Ktx/sec

iterate

db on disk schema indices new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str unique_0 21.4±0.21µs 20.7±0.20µs 45.6 Ktx/sec 47.1 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 18.0±0.08µs 19.0±0.15µs 54.3 Ktx/sec 51.4 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 19.6±0.21µs 19.2±0.19µs 49.8 Ktx/sec 50.8 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 17.0±0.06µs 17.9±0.16µs 57.5 Ktx/sec 54.7 Ktx/sec
stdb_raw 💿 u32_u64_str unique_0 3.9±0.00µs 3.9±0.00µs 251.4 Ktx/sec 250.0 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 3.7±0.00µs 3.8±0.00µs 260.7 Ktx/sec 259.5 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 3.9±0.00µs 3.9±0.00µs 253.4 Ktx/sec 252.2 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 3.7±0.00µs 3.7±0.00µs 263.0 Ktx/sec 261.7 Ktx/sec

find_unique

db on disk key type preload new latency old latency new throughput old throughput

filter

db on disk key type index strategy load count new latency old latency new throughput old throughput
sqlite 💿 string index 2048 256 66.1±0.21µs 66.2±0.06µs 14.8 Ktx/sec 14.7 Ktx/sec
sqlite 💿 u64 index 2048 256 61.8±0.05µs 63.3±0.28µs 15.8 Ktx/sec 15.4 Ktx/sec
sqlite 🧠 string index 2048 256 64.1±0.07µs 64.5±0.16µs 15.2 Ktx/sec 15.1 Ktx/sec
sqlite 🧠 u64 index 2048 256 57.5±0.07µs 59.8±0.05µs 17.0 Ktx/sec 16.3 Ktx/sec
stdb_raw 💿 string index 2048 256 5.1±0.00µs 5.1±0.00µs 191.5 Ktx/sec 191.9 Ktx/sec
stdb_raw 💿 u64 index 2048 256 5.0±0.00µs 5.0±0.00µs 194.5 Ktx/sec 194.2 Ktx/sec
stdb_raw 🧠 string index 2048 256 5.1±0.00µs 5.1±0.00µs 193.0 Ktx/sec 193.0 Ktx/sec
stdb_raw 🧠 u64 index 2048 256 5.0±0.00µs 5.0±0.00µs 195.7 Ktx/sec 195.6 Ktx/sec

serialize

schema format count new latency old latency new throughput old throughput
u32_u64_str bflatn_to_bsatn_fast_path 100 3.7±0.01µs 3.7±0.01µs 25.8 Mtx/sec 25.8 Mtx/sec
u32_u64_str bflatn_to_bsatn_slow_path 100 2.9±0.01µs 3.0±0.00µs 32.3 Mtx/sec 31.7 Mtx/sec
u32_u64_str bsatn 100 2.3±0.04µs 2.5±0.06µs 40.8 Mtx/sec 38.5 Mtx/sec
u32_u64_str json 100 4.6±0.03µs 4.7±0.05µs 20.6 Mtx/sec 20.4 Mtx/sec
u32_u64_str product_value 100 1013.8±0.53ns 1014.6±1.56ns 94.1 Mtx/sec 94.0 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_fast_path 100 1171.9±25.30ns 1145.2±7.02ns 81.4 Mtx/sec 83.3 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_slow_path 100 2.4±0.00µs 2.4±0.00µs 40.2 Mtx/sec 40.0 Mtx/sec
u32_u64_u64 bsatn 100 1628.4±28.71ns 1702.2±27.51ns 58.6 Mtx/sec 56.0 Mtx/sec
u32_u64_u64 json 100 3.2±0.11µs 3.1±0.12µs 29.4 Mtx/sec 30.3 Mtx/sec
u32_u64_u64 product_value 100 1009.3±0.46ns 1008.9±0.38ns 94.5 Mtx/sec 94.5 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_fast_path 100 896.4±17.02ns 889.8±3.43ns 106.4 Mtx/sec 107.2 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_slow_path 100 2.4±0.04µs 2.4±0.10µs 40.0 Mtx/sec 39.9 Mtx/sec
u64_u64_u32 bsatn 100 1661.0±29.07ns 1662.1±37.10ns 57.4 Mtx/sec 57.4 Mtx/sec
u64_u64_u32 json 100 3.1±0.16µs 3.4±0.03µs 30.5 Mtx/sec 27.8 Mtx/sec
u64_u64_u32 product_value 100 1010.1±0.42ns 1009.1±0.70ns 94.4 Mtx/sec 94.5 Mtx/sec

stdb_module_large_arguments

arg size new latency old latency new throughput old throughput
64KiB 69.3±9.00µs 74.9±4.89µs - -

stdb_module_print_bulk

line count new latency old latency new throughput old throughput
1 36.6±5.38µs 34.9±3.42µs - -
100 339.7±7.44µs 342.4±4.94µs - -
1000 3.0±0.06ms 2.8±0.51ms - -

remaining

name new latency old latency new throughput old throughput
sqlite/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 46.2±0.44µs 47.5±0.14µs 21.1 Ktx/sec 20.5 Ktx/sec
sqlite/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 41.2±0.21µs 40.4±0.27µs 23.7 Ktx/sec 24.2 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 40.0±0.39µs 41.3±0.22µs 24.4 Ktx/sec 23.7 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 35.4±0.07µs 35.4±0.16µs 27.6 Ktx/sec 27.6 Ktx/sec
stdb_module/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 1434.6±14.06µs 1425.6±19.70µs 697 tx/sec 701 tx/sec
stdb_module/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 1091.8±13.78µs 1082.4±14.69µs 915 tx/sec 923 tx/sec
stdb_raw/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 700.8±23.40µs 689.2±20.96µs 1427 tx/sec 1450 tx/sec
stdb_raw/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 494.4±6.61µs 500.9±5.95µs 2022 tx/sec 1996 tx/sec
stdb_raw/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 444.0±0.21µs 445.6±0.36µs 2.2 Ktx/sec 2.2 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 400.8±0.25µs 405.4±0.51µs 2.4 Ktx/sec 2.4 Ktx/sec

@github-actions
Copy link

@github-actions github-actions bot commented on ebc9218 May 20, 2024

Choose a reason for hiding this comment

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

Callgrind benchmark results

Callgrind Benchmark Report

These benchmarks were run using callgrind,
an instruction-level profiler. They allow comparisons between sqlite (sqlite), SpacetimeDB running through a module (stdb_module), and the underlying SpacetimeDB data storage engine (stdb_raw). Callgrind emulates a CPU to collect the below estimates.

Measurement changes larger than five percent are in bold.

In-memory benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 5998 5998 0.00% 6868 6856 0.18%
sqlite 5676 5676 0.00% 6122 6110 0.20%

callgrind: filter

db schema indices count preload _column data_type total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str no_index 64 128 1 u64 78980 78980 0.00% 79580 79380 0.25%
stdb_raw u32_u64_str no_index 64 128 2 string 121267 121267 0.00% 122049 121869 0.15%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24135 24135 0.00% 24543 24435 0.44%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25173 25175 -0.01% 25623 25649 -0.10%
sqlite u32_u64_str no_index 64 128 2 string 143670 143670 0.00% 145360 145408 -0.03%
sqlite u32_u64_str no_index 64 128 1 u64 123021 123021 0.00% 124401 124341 0.05%
sqlite u32_u64_str btree_each_column 64 128 2 string 133527 133542 -0.01% 135261 135328 -0.05%
sqlite u32_u64_str btree_each_column 64 128 1 u64 130322 130322 0.00% 131730 131810 -0.06%

callgrind: insert bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 64 128 953642 953675 -0.00% 1008470 1006889 0.16%
stdb_raw u32_u64_str btree_each_column 64 128 1083123 1086857 -0.34% 1161249 1157763 0.30%
sqlite u32_u64_str unique_0 64 128 398425 398425 0.00% 419117 416621 0.60%
sqlite u32_u64_str btree_each_column 64 128 971498 971498 0.00% 1009288 1008168 0.11%

callgrind: iterate

db schema indices count total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 152049 152049 0.00% 152151 152151 0.00%
stdb_raw u32_u64_str unique_0 64 16032 16032 0.00% 16130 16130 0.00%
sqlite u32_u64_str unique_0 1024 1046895 1046916 -0.00% 1050029 1050268 -0.02%
sqlite u32_u64_str unique_0 64 75041 75041 0.00% 76023 76047 -0.03%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47438 47438 0.00% 50090 50090 0.00%
64 bsatn 25717 25717 0.00% 27995 27995 0.00%
16 bsatn 8118 8118 0.00% 9478 9478 0.00%
16 json 12142 12142 0.00% 14046 14046 0.00%

callgrind: update bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 1024 22582890 22581920 0.00% 23215748 23334090 -0.51%
stdb_raw u32_u64_str unique_0 64 128 1432284 1432303 -0.00% 1509626 1517357 -0.51%
sqlite u32_u64_str unique_0 1024 1024 1802012 1802012 0.00% 1811738 1811598 0.01%
sqlite u32_u64_str unique_0 64 128 128548 128548 0.00% 131336 131408 -0.05%
On-disk benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 6363 6363 0.00% 7221 7229 -0.11%
sqlite 5718 5718 0.00% 6190 6178 0.19%

callgrind: filter

db schema indices count preload _column data_type total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str no_index 64 128 1 u64 79345 79345 0.00% 80085 79857 0.29%
stdb_raw u32_u64_str no_index 64 128 2 string 121632 121632 0.00% 122606 122506 0.08%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24500 24500 0.00% 25036 24960 0.30%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25718 25539 0.70% 26404 26089 1.21%
sqlite u32_u64_str no_index 64 128 1 u64 124932 124947 -0.01% 126636 126671 -0.03%
sqlite u32_u64_str no_index 64 128 2 string 145591 145591 0.00% 147633 147589 0.03%
sqlite u32_u64_str btree_each_column 64 128 1 u64 132418 132418 0.00% 134236 134248 -0.01%
sqlite u32_u64_str btree_each_column 64 128 2 string 135577 135577 0.00% 137677 137713 -0.03%

callgrind: insert bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 64 128 902839 902958 -0.01% 923617 924430 -0.09%
stdb_raw u32_u64_str btree_each_column 64 128 1031410 1032191 -0.08% 1108494 1103423 0.46%
sqlite u32_u64_str unique_0 64 128 415973 415973 0.00% 436281 433681 0.60%
sqlite u32_u64_str btree_each_column 64 128 1022073 1022088 -0.00% 1059173 1057352 0.17%

callgrind: iterate

db schema indices count total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 152414 152414 0.00% 152624 152568 0.04%
stdb_raw u32_u64_str unique_0 64 16397 16397 0.00% 16607 16551 0.34%
sqlite u32_u64_str unique_0 1024 1049963 1049969 -0.00% 1053685 1053715 -0.00%
sqlite u32_u64_str unique_0 64 76813 76813 0.00% 78067 78071 -0.01%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47438 47438 0.00% 50090 50090 0.00%
64 bsatn 25717 25717 0.00% 27995 27995 0.00%
16 bsatn 8118 8118 0.00% 9478 9478 0.00%
16 json 12142 12142 0.00% 14046 14046 0.00%

callgrind: update bulk

db schema indices count preload total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw u32_u64_str unique_0 1024 1024 21540994 21542846 -0.01% 22233088 22382122 -0.67%
stdb_raw u32_u64_str unique_0 64 128 1389347 1389550 -0.01% 1462789 1473264 -0.71%
sqlite u32_u64_str unique_0 1024 1024 1809808 1809808 0.00% 1818574 1818658 -0.00%
sqlite u32_u64_str unique_0 64 128 132696 132696 0.00% 135736 135720 0.01%

Please sign in to comment.