Skip to content

Commit

Permalink
NFC: Remove unused fsync param in benchmarks (#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser authored Nov 11, 2024
1 parent e4fcb72 commit 15b3e06
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 21 deletions.
12 changes: 6 additions & 6 deletions crates/bench/benches/callgrind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mod callgrind_benches {
assert_eq!(self.db, DB::name(), "provided metadata has incorrect db name");
assert_eq!(self.schema, T::name(), "provided metadata has incorrect db name");

let mut db = DB::build(self.in_memory, false).unwrap();
let mut db = DB::build(self.in_memory).unwrap();

let table_id = db.create_table::<T>(self.indices).unwrap();
let mut data = create_sequential::<T>(0xdeadbeef, self.count + self.preload, 64);
Expand Down Expand Up @@ -134,7 +134,7 @@ mod callgrind_benches {
"provided metadata has incorrect index strategy"
);

let mut db = DB::build(self.in_memory, false).unwrap();
let mut db = DB::build(self.in_memory).unwrap();

let table_id = db.create_table::<T>(self.indices).unwrap();
let data = create_sequential::<T>(0xdeadbeef, self.preload, 64);
Expand Down Expand Up @@ -198,7 +198,7 @@ mod callgrind_benches {
assert_eq!(self.db, DB::name(), "provided metadata has incorrect db name");
assert_eq!(self.schema, T::name(), "provided metadata has incorrect db name");

let mut db = DB::build(self.in_memory, false).unwrap();
let mut db = DB::build(self.in_memory).unwrap();

let table_id = db.create_table::<T>(self.indices).unwrap();
let data = create_sequential::<T>(0xdeadbeef, self.count, 64);
Expand Down Expand Up @@ -294,7 +294,7 @@ mod callgrind_benches {
"provided metadata has incorrect data type"
);

let mut db = DB::build(self.in_memory, false).unwrap();
let mut db = DB::build(self.in_memory).unwrap();

let table_id = db.create_table::<T>(self.indices).unwrap();
let data = create_partly_identical::<T>(0xdeadbeef, self.count as u64, self.preload as u64);
Expand Down Expand Up @@ -429,7 +429,7 @@ mod callgrind_benches {
"primary key in tuple slot 0 must be u32"
);

let mut db = DB::build(false, false).unwrap();
let mut db = DB::build(false).unwrap();

let table_id = db.create_table::<T>(self.indices).unwrap();

Expand Down Expand Up @@ -470,7 +470,7 @@ mod callgrind_benches {
);
assert_eq!(self.db, DB::name(), "provided metadata has incorrect db name");

let mut db = DB::build(self.in_memory, false).unwrap();
let mut db = DB::build(self.in_memory).unwrap();

// warm up
db.empty_transaction().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/bench/benches/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn criterion_benchmark(c: &mut Criterion) {

#[inline(never)]
fn bench_suite<DB: BenchDatabase>(c: &mut Criterion, in_memory: bool) -> ResultBench<()> {
let mut db = DB::build(in_memory, false)?; // don't need fsync benchmarks anymore
let mut db = DB::build(in_memory)?;
let param_db_name = DB::name();
let param_in_memory = if in_memory { "mem" } else { "disk" };
let db_params = format!("{param_db_name}/{param_in_memory}");
Expand Down
2 changes: 1 addition & 1 deletion crates/bench/benches/special.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn criterion_benchmark(c: &mut Criterion) {
serialize_benchmarks::<u32_u64_u64>(c);
serialize_benchmarks::<u64_u64_u32>(c);

let db = SpacetimeModule::build(true, true).unwrap();
let db = SpacetimeModule::build(true).unwrap();

custom_module_benchmarks(&db, c);
custom_db_benchmarks(&db, c);
Expand Down
2 changes: 1 addition & 1 deletion crates/bench/benches/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn insert_op(table_id: TableId, table_name: &str, row: ProductValue) -> Database
}

fn eval(c: &mut Criterion) {
let raw = SpacetimeRaw::build(false, false).unwrap();
let raw = SpacetimeRaw::build(false).unwrap();

let lhs = create_table_footprint(&raw.db).unwrap();
let rhs = create_table_location(&raw.db).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/bench/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub trait BenchDatabase: Sized {

type TableId: Clone + 'static;

fn build(in_memory: bool, fsync: bool) -> ResultBench<Self>
fn build(in_memory: bool) -> ResultBench<Self>
where
Self: Sized;

Expand Down
2 changes: 1 addition & 1 deletion crates/bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ mod tests {
) -> ResultBench<()> {
prepare_tests();

let mut db = DB::build(in_memory, false)?;
let mut db = DB::build(in_memory)?;
let table_id = db.create_table::<T>(index_strategy)?;
assert_eq!(db.count_table(&table_id)?, 0, "tables should begin empty");

Expand Down
2 changes: 1 addition & 1 deletion crates/bench/src/spacetime_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl BenchDatabase for SpacetimeModule {

type TableId = TableId;

fn build(in_memory: bool, _fsync: bool) -> ResultBench<Self>
fn build(in_memory: bool) -> ResultBench<Self>
where
Self: Sized,
{
Expand Down
2 changes: 1 addition & 1 deletion crates/bench/src/spacetime_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl BenchDatabase for SpacetimeRaw {
}
type TableId = TableId;

fn build(in_memory: bool, _fsync: bool) -> ResultBench<Self>
fn build(in_memory: bool) -> ResultBench<Self>
where
Self: Sized,
{
Expand Down
12 changes: 4 additions & 8 deletions crates/bench/src/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl BenchDatabase for SQLite {
"sqlite"
}

fn build(in_memory: bool, fsync: bool) -> ResultBench<Self>
fn build(in_memory: bool) -> ResultBench<Self>
where
Self: Sized,
{
Expand All @@ -37,13 +37,9 @@ impl BenchDatabase for SQLite {
} else {
Connection::open(temp_dir.path().join("test.db"))?
};
// For sqlite benchmarks we should set synchronous to either full or off which more
// closely aligns with wal_fsync=true and wal_fsync=false respectively in stdb.
db.execute_batch(if fsync {
"PRAGMA journal_mode = WAL; PRAGMA synchronous = full;"
} else {
"PRAGMA journal_mode = WAL; PRAGMA synchronous = off;"
})?;
// For sqlite benchmarks we should set synchronous to off which more
// closely aligns with wal_fsync=false in stdb.
db.execute_batch("PRAGMA journal_mode = WAL; PRAGMA synchronous = off;")?;

Ok(SQLite {
db,
Expand Down

2 comments on commit 15b3e06

@github-actions
Copy link

@github-actions github-actions bot commented on 15b3e06 Nov 11, 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 💿 417.8±1.96ns 430.4±3.50ns - -
sqlite 🧠 412.2±1.76ns 415.6±2.18ns - -
stdb_raw 💿 776.2±0.89ns 773.0±1.12ns - -
stdb_raw 🧠 777.4±0.60ns 773.9±1.78ns - -

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 592.2±0.77µs 589.9±0.34µs 1688 tx/sec 1695 tx/sec
sqlite 💿 u32_u64_str unique_0 2048 256 153.4±0.51µs 152.8±0.56µs 6.4 Ktx/sec 6.4 Ktx/sec
sqlite 💿 u32_u64_u64 btree_each_column 2048 256 472.9±0.67µs 469.3±0.58µs 2.1 Ktx/sec 2.1 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 2048 256 140.1±0.67µs 136.4±0.71µs 7.0 Ktx/sec 7.2 Ktx/sec
sqlite 🧠 u32_u64_str btree_each_column 2048 256 451.4±4.74µs 447.3±0.46µs 2.2 Ktx/sec 2.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 2048 256 123.5±0.39µs 122.3±2.42µs 7.9 Ktx/sec 8.0 Ktx/sec
sqlite 🧠 u32_u64_u64 btree_each_column 2048 256 369.2±0.35µs 369.3±0.58µs 2.6 Ktx/sec 2.6 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 2048 256 108.7±0.68µs 106.5±0.57µs 9.0 Ktx/sec 9.2 Ktx/sec
stdb_raw 💿 u32_u64_str btree_each_column 2048 256 586.9±12.66µs 598.1±23.10µs 1703 tx/sec 1672 tx/sec
stdb_raw 💿 u32_u64_str unique_0 2048 256 405.1±20.81µs 416.5±34.32µs 2.4 Ktx/sec 2.3 Ktx/sec
stdb_raw 💿 u32_u64_u64 btree_each_column 2048 256 332.9±11.78µs 372.9±7.29µs 2.9 Ktx/sec 2.6 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 2048 256 343.5±9.32µs 349.7±7.29µs 2.8 Ktx/sec 2.8 Ktx/sec
stdb_raw 🧠 u32_u64_str btree_each_column 2048 256 298.2±0.25µs 297.6±0.30µs 3.3 Ktx/sec 3.3 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 2048 256 230.5±0.33µs 234.6±0.57µs 4.2 Ktx/sec 4.2 Ktx/sec
stdb_raw 🧠 u32_u64_u64 btree_each_column 2048 256 236.9±0.44µs 237.8±0.14µs 4.1 Ktx/sec 4.1 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 2048 256 210.4±0.12µs 214.4±0.25µs 4.6 Ktx/sec 4.6 Ktx/sec

iterate

db on disk schema indices new latency old latency new throughput old throughput
sqlite 💿 u32_u64_str unique_0 23.6±0.25µs 23.3±0.11µs 41.3 Ktx/sec 41.9 Ktx/sec
sqlite 💿 u32_u64_u64 unique_0 21.2±0.08µs 21.6±0.21µs 46.1 Ktx/sec 45.2 Ktx/sec
sqlite 🧠 u32_u64_str unique_0 20.6±0.28µs 20.8±0.18µs 47.4 Ktx/sec 47.0 Ktx/sec
sqlite 🧠 u32_u64_u64 unique_0 19.0±0.15µs 19.0±0.08µs 51.4 Ktx/sec 51.4 Ktx/sec
stdb_raw 💿 u32_u64_str unique_0 4.9±0.00µs 4.9±0.00µs 200.1 Ktx/sec 199.9 Ktx/sec
stdb_raw 💿 u32_u64_u64 unique_0 4.8±0.00µs 4.8±0.00µs 204.2 Ktx/sec 204.3 Ktx/sec
stdb_raw 🧠 u32_u64_str unique_0 4.9±0.00µs 4.9±0.00µs 200.2 Ktx/sec 199.8 Ktx/sec
stdb_raw 🧠 u32_u64_u64 unique_0 4.8±0.00µs 4.8±0.00µs 204.3 Ktx/sec 204.4 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.9±0.10µs 68.8±0.24µs 14.6 Ktx/sec 14.2 Ktx/sec
sqlite 💿 u64 index 2048 256 64.4±0.24µs 66.0±0.33µs 15.2 Ktx/sec 14.8 Ktx/sec
sqlite 🧠 string index 2048 256 63.8±0.20µs 65.2±0.17µs 15.3 Ktx/sec 15.0 Ktx/sec
sqlite 🧠 u64 index 2048 256 58.7±0.06µs 60.0±0.10µs 16.6 Ktx/sec 16.3 Ktx/sec
stdb_raw 💿 string index 2048 256 5.2±0.00µs 5.0±0.00µs 188.2 Ktx/sec 195.6 Ktx/sec
stdb_raw 💿 u64 index 2048 256 5.1±0.00µs 4.9±0.00µs 192.3 Ktx/sec 198.5 Ktx/sec
stdb_raw 🧠 string index 2048 256 5.2±0.00µs 5.0±0.00µs 188.3 Ktx/sec 195.4 Ktx/sec
stdb_raw 🧠 u64 index 2048 256 5.1±0.01µs 4.9±0.00µs 192.3 Ktx/sec 198.3 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.6±0.00µs 26.1 Mtx/sec 26.8 Mtx/sec
u32_u64_str bflatn_to_bsatn_slow_path 100 3.6±0.01µs 3.6±0.05µs 26.8 Mtx/sec 26.8 Mtx/sec
u32_u64_str bsatn 100 2.3±0.02µs 2.3±0.03µs 40.7 Mtx/sec 41.0 Mtx/sec
u32_u64_str bsatn 100 7.1±0.07ns 15.5±0.15ns 13.1 Gtx/sec 6.0 Gtx/sec
u32_u64_str json 100 4.8±0.04µs 4.8±0.10µs 19.7 Mtx/sec 19.7 Mtx/sec
u32_u64_str json 100 8.3±0.12µs 8.0±0.09µs 11.4 Mtx/sec 11.9 Mtx/sec
u32_u64_str product_value 100 1020.1±3.60ns 1019.5±0.41ns 93.5 Mtx/sec 93.5 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_fast_path 100 971.5±12.88ns 949.3±16.96ns 98.2 Mtx/sec 100.5 Mtx/sec
u32_u64_u64 bflatn_to_bsatn_slow_path 100 2.8±0.00µs 2.8±0.01µs 34.5 Mtx/sec 34.4 Mtx/sec
u32_u64_u64 bsatn 100 1604.5±37.72ns 1637.8±32.03ns 59.4 Mtx/sec 58.2 Mtx/sec
u32_u64_u64 bsatn 100 6.7±0.03ns 14.8±0.01ns 13.9 Gtx/sec 6.3 Gtx/sec
u32_u64_u64 json 100 3.3±0.02µs 3.1±0.01µs 29.2 Mtx/sec 30.8 Mtx/sec
u32_u64_u64 json 100 6.1±0.09µs 6.0±0.22µs 15.7 Mtx/sec 16.0 Mtx/sec
u32_u64_u64 product_value 100 1016.6±0.80ns 1014.4±0.81ns 93.8 Mtx/sec 94.0 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_fast_path 100 740.7±3.47ns 737.8±1.62ns 128.8 Mtx/sec 129.3 Mtx/sec
u64_u64_u32 bflatn_to_bsatn_slow_path 100 2.8±0.00µs 2.8±0.01µs 34.4 Mtx/sec 34.3 Mtx/sec
u64_u64_u32 bsatn 100 1580.5±20.42ns 1583.8±35.17ns 60.3 Mtx/sec 60.2 Mtx/sec
u64_u64_u32 bsatn 100 691.2±1.66ns 691.1±1.67ns 138.0 Mtx/sec 138.0 Mtx/sec
u64_u64_u32 json 100 3.4±0.03µs 3.4±0.10µs 28.4 Mtx/sec 28.1 Mtx/sec
u64_u64_u32 json 100 6.2±0.15µs 6.0±0.16µs 15.5 Mtx/sec 16.0 Mtx/sec
u64_u64_u32 product_value 100 1013.7±0.60ns 1013.7±0.61ns 94.1 Mtx/sec 94.1 Mtx/sec

stdb_module_large_arguments

arg size new latency old latency new throughput old throughput
64KiB 106.2±9.10µs 101.2±7.76µs - -

stdb_module_print_bulk

line count new latency old latency new throughput old throughput
1 52.9±7.03µs 49.8±5.15µs - -
100 601.0±16.01µs 604.7±12.02µs - -
1000 5.1±0.70ms 5.2±0.74ms - -

remaining

name new latency old latency new throughput old throughput
special/db_game/circles/load=10 44.8±8.40ms 49.0±3.08ms - -
special/db_game/circles/load=100 48.0±4.77ms 37.3±4.00ms - -
special/db_game/ia_loop/load=500 149.6±1.51ms 145.8±1.77ms - -
special/db_game/ia_loop/load=5000 5.5±0.02s 5.4±0.02s - -
sqlite/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 55.8±0.20µs 53.7±0.18µs 17.5 Ktx/sec 18.2 Ktx/sec
sqlite/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 48.5±0.19µs 46.0±0.10µs 20.1 Ktx/sec 21.2 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 40.7±0.21µs 40.4±0.10µs 24.0 Ktx/sec 24.2 Ktx/sec
sqlite/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 37.8±0.27µs 35.3±0.06µs 25.8 Ktx/sec 27.7 Ktx/sec
stdb_module/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 1276.8±23.75µs 1263.9±4.49µs 783 tx/sec 791 tx/sec
stdb_module/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 1013.0±10.14µs 1013.1±8.31µs 987 tx/sec 987 tx/sec
stdb_raw/💿/update_bulk/u32_u64_str/unique_0/load=2048/count=256 623.8±23.66µs 640.5±18.04µs 1602 tx/sec 1561 tx/sec
stdb_raw/💿/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 477.5±6.10µs 442.2±31.87µs 2.0 Ktx/sec 2.2 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_str/unique_0/load=2048/count=256 368.2±0.62µs 370.8±0.77µs 2.7 Ktx/sec 2.6 Ktx/sec
stdb_raw/🧠/update_bulk/u32_u64_u64/unique_0/load=2048/count=256 332.5±0.60µs 333.7±0.56µs 2.9 Ktx/sec 2.9 Ktx/sec

@github-actions
Copy link

@github-actions github-actions bot commented on 15b3e06 Nov 11, 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 6399 6399 0.00% 6491 6523 -0.49%
sqlite 5579 5579 0.00% 6023 6031 -0.13%

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 76593 76593 0.00% 76989 77041 -0.07%
stdb_raw u32_u64_str no_index 64 128 2 string 119091 119083 0.01% 119895 119783 0.09%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25084 25084 0.00% 25688 25724 -0.14%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24051 24051 0.00% 24459 24459 0.00%
sqlite u32_u64_str no_index 64 128 2 string 144695 144695 0.00% 146185 146205 -0.01%
sqlite u32_u64_str no_index 64 128 1 u64 124044 124044 0.00% 125270 125402 -0.11%
sqlite u32_u64_str btree_each_column 64 128 1 u64 131361 131379 -0.01% 132715 132761 -0.03%
sqlite u32_u64_str btree_each_column 64 128 2 string 134527 134494 0.02% 136073 136100 -0.02%

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 876217 876910 -0.08% 902769 900594 0.24%
stdb_raw u32_u64_str btree_each_column 64 128 1029824 1027394 0.24% 1074064 1067654 0.60%
sqlite u32_u64_str unique_0 64 128 398320 398320 0.00% 416916 416078 0.20%
sqlite u32_u64_str btree_each_column 64 128 983637 983637 0.00% 1021765 1020193 0.15%

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 153726 153726 0.00% 153834 153890 -0.04%
stdb_raw u32_u64_str unique_0 64 16751 16751 0.00% 16843 16899 -0.33%
sqlite u32_u64_str unique_0 1024 1067261 1067255 0.00% 1070727 1070587 0.01%
sqlite u32_u64_str unique_0 64 76201 76207 -0.01% 77287 77345 -0.07%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47528 47528 0.00% 50282 50282 0.00%
64 bsatn 25509 25509 0.00% 27787 27821 -0.12%
16 bsatn 8200 8200 0.00% 9594 9628 -0.35%
16 json 12188 12188 0.00% 14194 14194 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 20498221 20084122 2.06% 21236439 20663918 2.77%
stdb_raw u32_u64_str unique_0 64 128 1284869 1284778 0.01% 1332883 1328372 0.34%
sqlite u32_u64_str unique_0 1024 1024 1802182 1802182 0.00% 1811296 1811498 -0.01%
sqlite u32_u64_str unique_0 64 128 128561 128528 0.03% 131441 131440 0.00%
On-disk benchmarks

callgrind: empty transaction

db total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
stdb_raw 6404 6404 0.00% 6512 6544 -0.49%
sqlite 5621 5621 0.00% 6125 6137 -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 76598 76598 0.00% 76978 77022 -0.06%
stdb_raw u32_u64_str no_index 64 128 2 string 120185 119096 0.91% 120941 119888 0.88%
stdb_raw u32_u64_str btree_each_column 64 128 2 string 25089 25089 0.00% 25605 25613 -0.03%
stdb_raw u32_u64_str btree_each_column 64 128 1 u64 24056 24056 0.00% 24428 24452 -0.10%
sqlite u32_u64_str no_index 64 128 1 u64 125965 125983 -0.01% 127491 127557 -0.05%
sqlite u32_u64_str no_index 64 128 2 string 146634 146616 0.01% 148408 148418 -0.01%
sqlite u32_u64_str btree_each_column 64 128 2 string 136616 136616 0.00% 138560 138736 -0.13%
sqlite u32_u64_str btree_each_column 64 128 1 u64 133457 133457 0.00% 135301 135397 -0.07%

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 825650 826058 -0.05% 851288 879760 -3.24%
stdb_raw u32_u64_str btree_each_column 64 128 976509 975006 0.15% 1049755 1044532 0.50%
sqlite u32_u64_str unique_0 64 128 415857 415857 0.00% 433711 432831 0.20%
sqlite u32_u64_str btree_each_column 64 128 1021904 1021898 0.00% 1059220 1057342 0.18%

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 153731 153731 0.00% 153823 153879 -0.04%
stdb_raw u32_u64_str unique_0 64 16756 16756 0.00% 16848 16900 -0.31%
sqlite u32_u64_str unique_0 1024 1070323 1070323 0.00% 1074101 1074041 0.01%
sqlite u32_u64_str unique_0 64 77973 77973 0.00% 79343 79243 0.13%

callgrind: serialize_product_value

count format total reads + writes old total reads + writes Δrw estimated cycles old estimated cycles Δcycles
64 json 47528 47528 0.00% 50282 50282 0.00%
64 bsatn 25509 25509 0.00% 27787 27821 -0.12%
16 bsatn 8200 8200 0.00% 9594 9628 -0.35%
16 json 12188 12188 0.00% 14194 14194 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 19001759 19003530 -0.01% 19737077 19653578 0.42%
stdb_raw u32_u64_str unique_0 64 128 1237415 1237240 0.01% 1315579 1309504 0.46%
sqlite u32_u64_str unique_0 1024 1024 1809743 1809743 0.00% 1818397 1818427 -0.00%
sqlite u32_u64_str unique_0 64 128 132654 132654 0.00% 135622 135758 -0.10%

Please sign in to comment.