Skip to content

Commit

Permalink
clarify cost of dropping the updates in eval_incr (#1192)
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril authored May 2, 2024
1 parent 6810821 commit 7c52ef5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions crates/bench/benches/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use spacetimedb::client::Protocol;
use spacetimedb::db::relational_db::RelationalDB;
use spacetimedb::error::DBError;
use spacetimedb::execution_context::ExecutionContext;
use spacetimedb::host::module_host::{DatabaseTableUpdate, DatabaseUpdate};
use spacetimedb::host::module_host::DatabaseTableUpdate;
use spacetimedb::subscription::query::compile_read_only_query;
use spacetimedb::subscription::subscription::ExecutionSet;
use spacetimedb::util::slow::SlowQueryConfig;
Expand Down Expand Up @@ -97,10 +97,7 @@ fn eval(c: &mut Criterion) {

let ins_lhs = insert_op(lhs, "footprint", new_lhs_row);
let ins_rhs = insert_op(rhs, "location", new_rhs_row);

let update = DatabaseUpdate {
tables: vec![ins_lhs, ins_rhs],
};
let update = [&ins_lhs, &ins_rhs];

let bench_eval = |c: &mut Criterion, name, sql| {
c.bench_function(name, |b| {
Expand Down
1 change: 1 addition & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spacetimedb-table.workspace = true
spacetimedb-vm.workspace = true

anyhow = { workspace = true, features = ["backtrace"] }
arrayvec.workspace = true
async-trait.workspace = true
backtrace.workspace = true
base64.workspace = true
Expand Down
16 changes: 8 additions & 8 deletions crates/core/src/subscription/module_subscription_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use crate::db::relational_db::RelationalDB;
use crate::execution_context::ExecutionContext;
use crate::host::module_host::{DatabaseTableUpdate, ModuleEvent, ProtocolDatabaseUpdate};
use crate::json::client_api::{TableRowOperationJson, TableUpdateJson};
use arrayvec::ArrayVec;
use itertools::Either;
use rayon::iter::{IntoParallelIterator, ParallelIterator};
use smallvec::SmallVec;
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use spacetimedb_client_api_messages::client_api::{TableRowOperation, TableUpdate};
use spacetimedb_data_structures::map::{Entry, HashMap, HashSet, IntMap};
use spacetimedb_lib::{Address, Identity};
Expand Down Expand Up @@ -128,11 +128,11 @@ impl SubscriptionManager {
// Collect the delta tables for each query.
// For selects this is just a single table.
// For joins it's two tables.
let mut units: HashMap<_, SmallVec<[_; 2]>> = HashMap::new();
let mut units: HashMap<_, ArrayVec<_, 2>> = HashMap::new();
for table @ DatabaseTableUpdate { table_id, .. } in tables {
if let Some(hashes) = self.tables.get(table_id) {
for hash in hashes {
units.entry(hash).or_insert_with(SmallVec::new).push(table);
units.entry(hash).or_insert_with(ArrayVec::new).push(table);
}
}
}
Expand All @@ -141,10 +141,10 @@ impl SubscriptionManager {
let ctx = ExecutionContext::incremental_update(db.address(), slow);
let tx = &tx.deref().into();
let eval = units
.into_par_iter()
.filter_map(|(hash, tables)| self.queries.get(hash).map(|unit| (hash, tables, unit)))
.filter_map(|(hash, tables, unit)| {
match unit.eval_incr(&ctx, db, tx, &unit.sql, tables.into_iter()) {
.par_iter()
.filter_map(|(&hash, tables)| {
let unit = self.queries.get(hash)?;
match unit.eval_incr(&ctx, db, tx, &unit.sql, tables.iter().copied()) {
Ok(None) => None,
Ok(Some(table)) => Some((hash, table)),
Err(err) => {
Expand Down
5 changes: 4 additions & 1 deletion crates/core/src/subscription/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ mod tests {
) -> ResultTest<()> {
let ctx = &ExecutionContext::incremental_update(db.address(), SlowQueryConfig::default());
let tx = &tx.into();
let result = s.eval_incr(ctx, db, tx, update)?;
let update = update.tables.iter().collect::<Vec<_>>();
let result = s.eval_incr(ctx, db, tx, &update)?;
assert_eq!(
result.tables.len(),
total_tables,
Expand Down Expand Up @@ -370,6 +371,7 @@ mod tests {

let ctx = &ExecutionContext::incremental_update(db.address(), SlowQueryConfig::default());
let tx = (&tx).into();
let update = update.tables.iter().collect::<Vec<_>>();
let result = query.eval_incr(ctx, &db, &tx, &update)?;

assert_eq!(result.tables.len(), 1);
Expand Down Expand Up @@ -726,6 +728,7 @@ mod tests {
let update = DatabaseUpdate { tables };
db.with_read_only(ctx, |tx| {
let tx = (&*tx).into();
let update = update.tables.iter().collect::<Vec<_>>();
let result = query.eval_incr(ctx, db, &tx, &update)?;
let tables = result
.tables
Expand Down
10 changes: 4 additions & 6 deletions crates/core/src/subscription/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ use crate::client::Protocol;
use crate::db::relational_db::{RelationalDB, Tx};
use crate::error::{DBError, SubscriptionError};
use crate::execution_context::ExecutionContext;
use crate::host::module_host::{
DatabaseTableUpdate, DatabaseUpdate, DatabaseUpdateRelValue, ProtocolDatabaseUpdate, UpdatesRelValue,
};
use crate::host::module_host::{DatabaseTableUpdate, DatabaseUpdateRelValue, ProtocolDatabaseUpdate, UpdatesRelValue};
use crate::json::client_api::TableUpdateJson;
use crate::vm::{build_query, TxMode};
use anyhow::Context;
Expand Down Expand Up @@ -568,11 +566,11 @@ impl ExecutionSet {
ctx: &'a ExecutionContext,
db: &'a RelationalDB,
tx: &'a TxMode<'a>,
database_update: &'a DatabaseUpdate,
) -> Result<DatabaseUpdateRelValue<'_>, DBError> {
database_update: &'a [&'a DatabaseTableUpdate],
) -> Result<DatabaseUpdateRelValue<'a>, DBError> {
let mut tables = Vec::new();
for unit in &self.exec_units {
if let Some(table) = unit.eval_incr(ctx, db, tx, &unit.sql, database_update.tables.iter())? {
if let Some(table) = unit.eval_incr(ctx, db, tx, &unit.sql, database_update.iter().copied())? {
tables.push(table);
}
}
Expand Down

2 comments on commit 7c52ef5

@github-actions
Copy link

@github-actions github-actions bot commented on 7c52ef5 May 2, 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 💿 415.4±4.33ns 418.0±1.70ns - -
sqlite 🧠 409.5±2.95ns 415.1±1.67ns - -
stdb_raw 💿 712.5±1.18ns 721.5±2.43ns - -
stdb_raw 🧠 683.5±1.81ns 692.5±0.68ns - -

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 520.5±0.41µs 521.3±42.57µs 1921 tx/sec 1918 tx/sec
sqlite 💿 u32_u64_str unique_0 2048 256 137.2±0.49µs 133.1±0.54µs 7.1 Ktx/sec 7.3 Ktx/sec
sqlite 💿 u32_u64_u64 btree_each_column 2048 256 429.5±0.40µs 417.5±0.59µs 2.3 Ktx/sec 2.3 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 2048 256 127.0±0.36µs 120.9±0.71µs 7.7 Ktx/sec 8.1 Ktx/sec
sqlite 🧠 u32_u64_str btree_each_column 2048 256 451.2±0.84µs 442.6±0.30µs 2.2 Ktx/sec 2.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 2048 256 125.7±0.67µs 119.1±0.44µs 7.8 Ktx/sec 8.2 Ktx/sec
sqlite 🧠 u32_u64_u64 btree_each_column 2048 256 370.9±0.55µs 363.1±0.75µs 2.6 Ktx/sec 2.7 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 2048 256 109.2±0.57µs 104.1±0.51µs 8.9 Ktx/sec 9.4 Ktx/sec
stdb_raw 💿 u32_u64_str btree_each_column 2048 256 506.8±11.45µs 591.1±20.25µs 1973 tx/sec 1691 tx/sec
stdb_raw 💿 u32_u64_str unique_0 2048 256 494.9±40.79µs 495.1±33.10µs 2020 tx/sec 2019 tx/sec
stdb_raw 💿 u32_u64_u64 btree_each_column 2048 256 354.5±7.66µs 392.4±8.57µs 2.8 Ktx/sec 2.5 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 2048 256 324.3±3.87µs 315.5±17.77µs 3.0 Ktx/sec 3.1 Ktx/sec
stdb_raw 🧠 u32_u64_str btree_each_column 2048 256 338.2±0.16µs 324.9±0.22µs 2.9 Ktx/sec 3.0 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 2048 256 266.2±0.13µs 252.9±0.21µs 3.7 Ktx/sec 3.9 Ktx/sec
stdb_raw 🧠 u32_u64_u64 btree_each_column 2048 256 268.0±0.23µs 263.3±0.19µs 3.6 Ktx/sec 3.7 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 2048 256 242.2±0.12µs 231.4±0.28µs 4.0 Ktx/sec 4.2 Ktx/sec

iterate

db on disk schema indices new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str unique_0 22.0±0.18µs 20.3±0.07µs 44.3 Ktx/sec 48.0 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 19.9±0.06µs 19.2±0.20µs 49.0 Ktx/sec 50.8 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 20.7±0.10µs 19.6±0.36µs 47.1 Ktx/sec 49.9 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 19.2±0.05µs 18.1±0.24µs 51.0 Ktx/sec 53.8 Ktx/sec
stdb_raw 💿 u32_u64_str unique_0 4.7±0.00µs 4.7±0.00µs 208.5 Ktx/sec 208.1 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 4.6±0.00µs 4.6±0.00µs 214.2 Ktx/sec 213.8 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 4.6±0.00µs 4.7±0.00µs 210.5 Ktx/sec 209.1 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 4.5±0.00µs 4.5±0.00µs 215.8 Ktx/sec 214.8 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.2±0.32µs 70.2±0.18µs 14.8 Ktx/sec 13.9 Ktx/sec
sqlite 💿 u64 index 2048 256 62.7±0.22µs 66.5±0.27µs 15.6 Ktx/sec 14.7 Ktx/sec
sqlite 🧠 string index 2048 256 65.4±0.22µs 68.9±0.16µs 14.9 Ktx/sec 14.2 Ktx/sec
sqlite 🧠 u64 index 2048 256 59.1±0.32µs 63.7±0.44µs 16.5 Ktx/sec 15.3 Ktx/sec
stdb_raw 💿 string index 2048 256 5.1±0.00µs 5.1±0.00µs 193.1 Ktx/sec 192.0 Ktx/sec
stdb_raw 💿 u64 index 2048 256 5.0±0.00µs 5.1±0.00µs 195.9 Ktx/sec 190.0 Ktx/sec
stdb_raw 🧠 string index 2048 256 5.0±0.00µs 5.1±0.00µs 194.3 Ktx/sec 193.3 Ktx/sec
stdb_raw 🧠 u64 index 2048 256 5.0±0.00µs 5.1±0.00µs 197.1 Ktx/sec 191.2 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.00µs 3.4±0.00µs 25.9 Mtx/sec 28.1 Mtx/sec
u32_u64_str bflatn_to_bsatn_slow_path 100 3.5±0.01µs 3.6±0.00µs 27.3 Mtx/sec 26.8 Mtx/sec
u32_u64_str bsatn 100 2.4±0.01µs 2.5±0.00µs 39.1 Mtx/sec 38.8 Mtx/sec
u32_u64_str json 100 4.8±0.02µs 5.1±0.02µs 20.0 Mtx/sec 18.8 Mtx/sec
u32_u64_str product_value 100 1014.2±0.42ns 1015.6±4.91ns 94.0 Mtx/sec 93.9 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_fast_path 100 1394.9±4.55ns 1387.4±2.19ns 68.4 Mtx/sec 68.7 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_slow_path 100 2.9±0.00µs 2.8±0.01µs 33.4 Mtx/sec 34.2 Mtx/sec
u32_u64_u64 bsatn 100 1709.9±33.41ns 1753.7±35.85ns 55.8 Mtx/sec 54.4 Mtx/sec
u32_u64_u64 json 100 3.3±0.04µs 3.5±0.09µs 28.9 Mtx/sec 27.6 Mtx/sec
u32_u64_u64 product_value 100 1009.6±0.80ns 1011.5±0.52ns 94.5 Mtx/sec 94.3 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_fast_path 100 1172.7±6.73ns 1165.2±1.60ns 81.3 Mtx/sec 81.8 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_slow_path 100 2.9±0.00µs 2.8±0.01µs 33.3 Mtx/sec 34.4 Mtx/sec
u64_u64_u32 bsatn 100 1683.1±42.69ns 1743.2±32.15ns 56.7 Mtx/sec 54.7 Mtx/sec
u64_u64_u32 json 100 3.4±0.03µs 3.5±0.02µs 28.4 Mtx/sec 27.1 Mtx/sec
u64_u64_u32 product_value 100 1009.4±0.47ns 1011.0±0.91ns 94.5 Mtx/sec 94.3 Mtx/sec

stdb_module_large_arguments

arg size new latency old latency new throughput old throughput
64KiB 86.2±4.61µs 99.7±10.57µs - -

stdb_module_print_bulk

line count new latency old latency new throughput old throughput
1 50.3±3.72µs 35.7±3.40µs - -
100 353.8±10.35µs 347.6±5.22µs - -
1000 2.6±0.52ms 2.9±0.30ms - -

remaining

name new latency old latency new throughput old throughput
sqlite/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 49.3±0.25µs 45.3±0.09µs 19.8 Ktx/sec 21.6 Ktx/sec
sqlite/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 42.7±0.28µs 42.5±9.20µs 22.9 Ktx/sec 23.0 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 42.3±0.35µs 39.1±0.29µs 23.1 Ktx/sec 25.0 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 38.0±0.25µs 34.9±0.22µs 25.7 Ktx/sec 28.0 Ktx/sec
stdb_module/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 1424.9±17.81µs 1386.9±10.01µs 701 tx/sec 721 tx/sec
stdb_module/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 1075.0±4.51µs 1062.1±19.48µs 930 tx/sec 941 tx/sec
stdb_raw/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 712.7±18.90µs 678.6±16.36µs 1403 tx/sec 1473 tx/sec
stdb_raw/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 503.1±18.73µs 528.7±9.18µs 1987 tx/sec 1891 tx/sec
stdb_raw/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 448.4±0.25µs 421.5±0.38µs 2.2 Ktx/sec 2.3 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 404.9±0.31µs 385.6±0.74µs 2.4 Ktx/sec 2.5 Ktx/sec

@github-actions
Copy link

@github-actions github-actions bot commented on 7c52ef5 May 2, 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 6001 6174 -2.80% 6879 7066 -2.65%
sqlite 5676 5564 2.01% 6156 6078 1.28%

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 2 string 120699 119591 0.93% 121417 120305 0.92%
stdb_raw u32_u64_str no_index 64 128 1 u64 78433 77263 1.51% 78953 77757 1.54%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25157 25311 -0.61% 25603 25777 -0.68%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24116 24269 -0.63% 24432 24583 -0.61%
sqlite u32_u64_str no_index 64 128 2 string 143664 143685 -0.01% 145158 145345 -0.13%
sqlite u32_u64_str no_index 64 128 1 u64 123005 123026 -0.02% 124233 124314 -0.07%
sqlite u32_u64_str btree_each_column 64 128 1 u64 130322 130343 -0.02% 131716 131793 -0.06%
sqlite u32_u64_str btree_each_column 64 128 2 string 133527 133548 -0.02% 135235 135306 -0.05%

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 816967 798790 2.28% 837359 823744 1.65%
stdb_raw u32_u64_str btree_each_column 64 128 950387 930689 2.12% 992155 979475 1.29%
sqlite u32_u64_str unique_0 64 128 396307 396133 0.04% 416571 412365 1.02%
sqlite u32_u64_str btree_each_column 64 128 969380 969206 0.02% 1006490 1003628 0.29%

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 147933 148069 -0.09% 147975 148135 -0.11%
stdb_raw u32_u64_str unique_0 64 15747 15892 -0.91% 15785 15958 -1.08%
sqlite u32_u64_str unique_0 1024 1046895 1044679 0.21% 1050085 1048083 0.19%
sqlite u32_u64_str unique_0 64 75041 74745 0.40% 76031 75945 0.11%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 bsatn 25717 26691 -3.65% 28029 28969 -3.24%
64 json 47438 48688 -2.57% 49988 51204 -2.37%
16 bsatn 8118 8373 -3.05% 9478 9733 -2.62%
16 json 12142 12434 -2.35% 13944 14202 -1.82%

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 22191867 21788673 1.85% 22890433 22386437 2.25%
stdb_raw u32_u64_str unique_0 64 128 1293096 1270619 1.77% 1343440 1315283 2.14%
sqlite u32_u64_str unique_0 1024 1024 1802084 1801858 0.01% 1811480 1811072 0.02%
sqlite u32_u64_str unique_0 64 128 128620 128394 0.18% 131472 131270 0.15%
On-disk benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 6361 6568 -3.15% 7255 7484 -3.06%
sqlite 5718 5606 2.00% 6228 6138 1.47%

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 2 string 121059 119985 0.90% 121861 120823 0.86%
stdb_raw u32_u64_str no_index 64 128 1 u64 78793 77657 1.46% 79353 78243 1.42%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24476 24663 -0.76% 24820 25105 -1.14%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25515 25705 -0.74% 25989 26255 -1.01%
sqlite u32_u64_str no_index 64 128 2 string 145585 145606 -0.01% 147395 147478 -0.06%
sqlite u32_u64_str no_index 64 128 1 u64 124926 124947 -0.02% 126506 126535 -0.02%
sqlite u32_u64_str btree_each_column 64 128 2 string 135577 135598 -0.02% 137615 137734 -0.09%
sqlite u32_u64_str btree_each_column 64 128 1 u64 132418 132439 -0.02% 134150 134379 -0.17%

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 767734 748123 2.62% 793286 775059 2.35%
stdb_raw u32_u64_str btree_each_column 64 128 895174 878349 1.92% 939266 928843 1.12%
sqlite u32_u64_str unique_0 64 128 413861 413681 0.04% 433833 429529 1.00%
sqlite u32_u64_str btree_each_column 64 128 1019955 1019781 0.02% 1055901 1052973 0.28%

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 148293 148463 -0.11% 148327 148533 -0.14%
stdb_raw u32_u64_str unique_0 64 16107 16286 -1.10% 16141 16356 -1.31%
sqlite u32_u64_str unique_0 1024 1049963 1047747 0.21% 1053569 1051511 0.20%
sqlite u32_u64_str unique_0 64 76813 76517 0.39% 78067 77957 0.14%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 bsatn 25717 26691 -3.65% 28029 28969 -3.24%
64 json 47438 48688 -2.57% 49988 51204 -2.37%
16 bsatn 8118 8373 -3.05% 9478 9733 -2.62%
16 json 12142 12434 -2.35% 13944 14202 -1.82%

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 21145794 20692507 2.19% 21941288 21398083 2.54%
stdb_raw u32_u64_str unique_0 64 128 1248478 1223133 2.07% 1305730 1274151 2.48%
sqlite u32_u64_str unique_0 1024 1024 1809880 1809648 0.01% 1818620 1818276 0.02%
sqlite u32_u64_str unique_0 64 128 132768 132536 0.18% 135804 135582 0.16%

Please sign in to comment.