Skip to content

Commit

Permalink
Fixed issue with perfcnt not working on certain platforms and archite…
Browse files Browse the repository at this point in the history
…ctures (#768)

* Fixed issue with perfcnt not working on certain platforms and architectures

* Update var_len_visitor.rs
  • Loading branch information
cloutiertyler authored Jan 27, 2024
1 parent 5df73e8 commit ecd366e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ nohash-hasher = "0.2"
once_cell = "1.16"
parking_lot = { version = "0.12.1", features = ["send_guard", "arc_lock"] }
paste = "1.0"
perfcnt = "0.8"
pin-project-lite = "0.2.9"
postgres-types = "0.2.5"
proc-macro2 = "1.0"
Expand Down
4 changes: 3 additions & 1 deletion crates/table/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ proptest-derive = { workspace = true, optional = true }
[dev-dependencies]
criterion.workspace = true
criterion-perf-events.workspace = true
perfcnt.workspace = true
proptest.workspace = true
proptest-derive.workspace = true
rand.workspace = true

[target.'cfg(all(target_os = "linux", target_arch = "x86"))'.dev-dependencies]
perfcnt = "0.8"
2 changes: 1 addition & 1 deletion crates/table/benches/var_len_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn visit_var_len_sum(c: &mut C) {
});
}

#[cfg(target_os = "linux")]
#[cfg(target_os = "linux", target_arch = "x86")]
mod config {
use criterion::Criterion;
use criterion_perf_events::Perf;
Expand Down

1 comment on commit ecd366e

@github-actions
Copy link

@github-actions github-actions bot commented on ecd366e Jan 27, 2024

Choose a reason for hiding this comment

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

Benchmark results

Benchmark Report

Legend:

  • load: number of rows pre-loaded into the database
  • count: number of rows touched by the transaction
  • index types:
    • unique: a single index on the id column
    • non_unique: no indexes
    • multi_index: non-unique index on every column
  • schemas:
    • person(id: u32, name: String, age: u64)
    • location(id: u32, x: u64, y: u64)

All throughputs are single-threaded.

Empty transaction

db on disk new latency old latency new throughput old throughput
sqlite 💿 438.2±1.79ns 437.2±1.79ns - -
sqlite 🧠 432.4±1.62ns 430.7±1.51ns - -
stdb_module 💿 20.1±1.50µs 19.8±1.17µs - -
stdb_module 🧠 19.9±1.02µs 20.1±1.17µs - -
stdb_raw 💿 932.8±1.98ns 932.1±1.88ns - -
stdb_raw 🧠 880.1±1.86ns 886.0±1.46ns - -

Single-row insertions

db on disk schema index type load new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 14.9±0.04µs 14.9±0.58µs 65.6 Ktx/sec 65.5 Ktx/sec
sqlite 💿 location multi_index 1000 15.7±0.11µs 15.9±0.24µs 62.2 Ktx/sec 61.5 Ktx/sec
sqlite 💿 location non_unique 0 7.2±0.52µs 7.3±0.31µs 135.6 Ktx/sec 134.4 Ktx/sec
sqlite 💿 location non_unique 1000 7.0±0.04µs 7.0±0.02µs 139.5 Ktx/sec 140.5 Ktx/sec
sqlite 💿 location unique 0 7.2±0.05µs 7.2±0.06µs 135.1 Ktx/sec 135.2 Ktx/sec
sqlite 💿 location unique 1000 7.1±0.04µs 7.0±0.03µs 138.5 Ktx/sec 138.8 Ktx/sec
sqlite 💿 person multi_index 0 14.6±0.05µs 14.4±0.02µs 66.8 Ktx/sec 67.8 Ktx/sec
sqlite 💿 person multi_index 1000 16.2±0.09µs 16.2±0.16µs 60.4 Ktx/sec 60.3 Ktx/sec
sqlite 💿 person non_unique 0 7.3±0.11µs 7.3±0.33µs 134.0 Ktx/sec 133.1 Ktx/sec
sqlite 💿 person non_unique 1000 7.2±0.05µs 7.2±0.04µs 136.0 Ktx/sec 135.5 Ktx/sec
sqlite 💿 person unique 0 7.2±0.05µs 7.3±0.04µs 134.8 Ktx/sec 133.8 Ktx/sec
sqlite 💿 person unique 1000 7.3±0.07µs 7.2±0.04µs 134.7 Ktx/sec 135.8 Ktx/sec
sqlite 🧠 location multi_index 0 4.1±0.03µs 4.1±0.01µs 236.7 Ktx/sec 239.7 Ktx/sec
sqlite 🧠 location multi_index 1000 5.3±0.05µs 5.2±0.04µs 183.3 Ktx/sec 188.4 Ktx/sec
sqlite 🧠 location non_unique 0 1867.3±13.52ns 1868.2±13.00ns 523.0 Ktx/sec 522.7 Ktx/sec
sqlite 🧠 location non_unique 1000 1945.3±20.17ns 1942.7±24.53ns 502.0 Ktx/sec 502.7 Ktx/sec
sqlite 🧠 location unique 0 1848.2±8.30ns 1838.4±15.27ns 528.4 Ktx/sec 531.2 Ktx/sec
sqlite 🧠 location unique 1000 1973.1±47.37ns 1965.3±13.86ns 494.9 Ktx/sec 496.9 Ktx/sec
sqlite 🧠 person multi_index 0 3.7±0.01µs 3.7±0.01µs 261.1 Ktx/sec 263.0 Ktx/sec
sqlite 🧠 person multi_index 1000 5.5±0.02µs 5.5±0.03µs 176.2 Ktx/sec 176.4 Ktx/sec
sqlite 🧠 person non_unique 0 1952.3±6.16ns 1947.3±4.56ns 500.2 Ktx/sec 501.5 Ktx/sec
sqlite 🧠 person non_unique 1000 2.0±0.01µs 2.0±0.01µs 487.6 Ktx/sec 483.9 Ktx/sec
sqlite 🧠 person unique 0 1939.6±7.69ns 1928.8±6.51ns 503.5 Ktx/sec 506.3 Ktx/sec
sqlite 🧠 person unique 1000 2.0±0.01µs 2.1±0.04µs 480.2 Ktx/sec 475.7 Ktx/sec
stdb_module 💿 location multi_index 0 57.5±5.63µs 57.3±4.69µs 17.0 Ktx/sec 17.0 Ktx/sec
stdb_module 💿 location multi_index 1000 56.4±4.44µs 169.8±45.06µs 17.3 Ktx/sec 5.7 Ktx/sec
stdb_module 💿 location non_unique 0 47.0±4.48µs 45.6±4.66µs 20.8 Ktx/sec 21.4 Ktx/sec
stdb_module 💿 location non_unique 1000 91.4±56.85µs 129.3±30.55µs 10.7 Ktx/sec 7.6 Ktx/sec
stdb_module 💿 location unique 0 55.3±5.43µs 53.1±5.57µs 17.6 Ktx/sec 18.4 Ktx/sec
stdb_module 💿 location unique 1000 127.5±23.13µs 62.7±34.74µs 7.7 Ktx/sec 15.6 Ktx/sec
stdb_module 💿 person multi_index 0 68.7±5.58µs 68.4±5.64µs 14.2 Ktx/sec 14.3 Ktx/sec
stdb_module 💿 person multi_index 1000 231.6±63.99µs 83.3±31.06µs 4.2 Ktx/sec 11.7 Ktx/sec
stdb_module 💿 person non_unique 0 57.6±5.03µs 53.1±3.91µs 16.9 Ktx/sec 18.4 Ktx/sec
stdb_module 💿 person non_unique 1000 121.4±65.63µs 99.1±85.56µs 8.0 Ktx/sec 9.9 Ktx/sec
stdb_module 💿 person unique 0 60.5±4.63µs 65.0±5.25µs 16.1 Ktx/sec 15.0 Ktx/sec
stdb_module 💿 person unique 1000 249.8±17.54µs 111.8±8.10µs 3.9 Ktx/sec 8.7 Ktx/sec
stdb_module 🧠 location multi_index 0 44.0±4.83µs 41.4±4.28µs 22.2 Ktx/sec 23.6 Ktx/sec
stdb_module 🧠 location multi_index 1000 72.9±13.27µs 40.9±1.58µs 13.4 Ktx/sec 23.9 Ktx/sec
stdb_module 🧠 location non_unique 0 33.1±2.89µs 35.0±3.07µs 29.5 Ktx/sec 27.9 Ktx/sec
stdb_module 🧠 location non_unique 1000 77.1±22.10µs 130.7±20.93µs 12.7 Ktx/sec 7.5 Ktx/sec
stdb_module 🧠 location unique 0 43.3±4.52µs 39.1±4.98µs 22.5 Ktx/sec 25.0 Ktx/sec
stdb_module 🧠 location unique 1000 35.4±2.27µs 72.1±30.46µs 27.6 Ktx/sec 13.6 Ktx/sec
stdb_module 🧠 person multi_index 0 50.8±4.89µs 50.4±4.82µs 19.2 Ktx/sec 19.4 Ktx/sec
stdb_module 🧠 person multi_index 1000 67.6±6.05µs 131.4±19.22µs 14.5 Ktx/sec 7.4 Ktx/sec
stdb_module 🧠 person non_unique 0 37.7±3.31µs 39.0±3.57µs 25.9 Ktx/sec 25.0 Ktx/sec
stdb_module 🧠 person non_unique 1000 223.6±52.24µs 201.1±69.45µs 4.4 Ktx/sec 4.9 Ktx/sec
stdb_module 🧠 person unique 0 45.1±3.59µs 43.0±4.01µs 21.6 Ktx/sec 22.7 Ktx/sec
stdb_module 🧠 person unique 1000 49.7±5.86µs 124.8±6.23µs 19.6 Ktx/sec 7.8 Ktx/sec
stdb_raw 💿 location multi_index 0 7.2±0.02µs 7.2±0.10µs 136.0 Ktx/sec 136.3 Ktx/sec
stdb_raw 💿 location multi_index 1000 29.4±192.73µs 28.8±188.71µs 33.3 Ktx/sec 34.0 Ktx/sec
stdb_raw 💿 location non_unique 0 4.8±0.01µs 4.9±0.02µs 201.7 Ktx/sec 199.3 Ktx/sec
stdb_raw 💿 location non_unique 1000 14.6±80.63µs 6.5±0.14µs 66.9 Ktx/sec 150.6 Ktx/sec
stdb_raw 💿 location unique 0 6.2±0.06µs 6.3±0.02µs 158.0 Ktx/sec 156.2 Ktx/sec
stdb_raw 💿 location unique 1000 26.6±179.54µs 26.5±178.23µs 36.7 Ktx/sec 36.9 Ktx/sec
stdb_raw 💿 person multi_index 0 11.5±0.02µs 11.4±0.04µs 85.2 Ktx/sec 85.7 Ktx/sec
stdb_raw 💿 person multi_index 1000 47.1±323.14µs 14.9±0.19µs 20.7 Ktx/sec 65.7 Ktx/sec
stdb_raw 💿 person non_unique 0 6.1±0.36µs 6.0±0.03µs 161.3 Ktx/sec 164.1 Ktx/sec
stdb_raw 💿 person non_unique 1000 7.9±0.08µs 7.9±0.23µs 124.1 Ktx/sec 123.1 Ktx/sec
stdb_raw 💿 person unique 0 8.3±0.03µs 8.4±0.02µs 117.7 Ktx/sec 115.7 Ktx/sec
stdb_raw 💿 person unique 1000 38.9±277.90µs 33.3±220.87µs 25.1 Ktx/sec 29.3 Ktx/sec
stdb_raw 🧠 location multi_index 0 4.6±0.01µs 4.6±0.01µs 211.6 Ktx/sec 212.9 Ktx/sec
stdb_raw 🧠 location multi_index 1000 6.4±0.03µs 6.2±0.03µs 153.2 Ktx/sec 156.4 Ktx/sec
stdb_raw 🧠 location non_unique 0 2.4±0.02µs 2.4±0.00µs 412.6 Ktx/sec 414.1 Ktx/sec
stdb_raw 🧠 location non_unique 1000 3.0±0.02µs 3.1±0.02µs 324.4 Ktx/sec 320.1 Ktx/sec
stdb_raw 🧠 location unique 0 3.7±0.01µs 3.6±0.03µs 266.6 Ktx/sec 267.6 Ktx/sec
stdb_raw 🧠 location unique 1000 4.9±0.05µs 4.9±0.03µs 199.1 Ktx/sec 197.7 Ktx/sec
stdb_raw 🧠 person multi_index 0 8.3±0.01µs 8.2±0.02µs 118.3 Ktx/sec 119.3 Ktx/sec
stdb_raw 🧠 person multi_index 1000 10.5±0.07µs 10.4±0.12µs 93.4 Ktx/sec 94.1 Ktx/sec
stdb_raw 🧠 person non_unique 0 2.9±0.01µs 2.9±0.01µs 334.3 Ktx/sec 334.8 Ktx/sec
stdb_raw 🧠 person non_unique 1000 3.7±0.02µs 3.7±0.02µs 260.6 Ktx/sec 261.6 Ktx/sec
stdb_raw 🧠 person unique 0 5.2±0.00µs 5.2±0.01µs 188.3 Ktx/sec 188.4 Ktx/sec
stdb_raw 🧠 person unique 1000 6.8±0.05µs 6.7±0.04µs 144.2 Ktx/sec 145.3 Ktx/sec

Multi-row insertions

db on disk schema index type load count new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 100 133.4±3.45µs 132.0±5.32µs 7.3 Ktx/sec 7.4 Ktx/sec
sqlite 💿 location multi_index 1000 100 205.5±1.23µs 203.9±1.12µs 4.8 Ktx/sec 4.8 Ktx/sec
sqlite 💿 location non_unique 0 100 50.5±1.47µs 50.2±1.90µs 19.4 Ktx/sec 19.5 Ktx/sec
sqlite 💿 location non_unique 1000 100 52.2±0.22µs 52.0±0.41µs 18.7 Ktx/sec 18.8 Ktx/sec
sqlite 💿 location unique 0 100 52.9±0.56µs 51.6±1.28µs 18.5 Ktx/sec 18.9 Ktx/sec
sqlite 💿 location unique 1000 100 57.1±0.25µs 56.8±0.49µs 17.1 Ktx/sec 17.2 Ktx/sec
sqlite 💿 person multi_index 0 100 119.1±3.19µs 120.0±12.52µs 8.2 Ktx/sec 8.1 Ktx/sec
sqlite 💿 person multi_index 1000 100 228.9±0.55µs 231.0±0.44µs 4.3 Ktx/sec 4.2 Ktx/sec
sqlite 💿 person non_unique 0 100 49.5±2.54µs 49.2±0.52µs 19.7 Ktx/sec 19.8 Ktx/sec
sqlite 💿 person non_unique 1000 100 60.9±0.30µs 60.9±0.26µs 16.0 Ktx/sec 16.0 Ktx/sec
sqlite 💿 person unique 0 100 50.6±0.96µs 50.9±1.94µs 19.3 Ktx/sec 19.2 Ktx/sec
sqlite 💿 person unique 1000 100 56.3±0.32µs 56.3±0.32µs 17.3 Ktx/sec 17.3 Ktx/sec
sqlite 🧠 location multi_index 0 100 121.5±1.05µs 120.6±0.38µs 8.0 Ktx/sec 8.1 Ktx/sec
sqlite 🧠 location multi_index 1000 100 171.8±0.48µs 171.3±0.50µs 5.7 Ktx/sec 5.7 Ktx/sec
sqlite 🧠 location non_unique 0 100 43.6±0.36µs 43.2±0.44µs 22.4 Ktx/sec 22.6 Ktx/sec
sqlite 🧠 location non_unique 1000 100 44.4±0.67µs 44.3±0.29µs 22.0 Ktx/sec 22.0 Ktx/sec
sqlite 🧠 location unique 0 100 47.5±0.29µs 46.1±0.25µs 20.6 Ktx/sec 21.2 Ktx/sec
sqlite 🧠 location unique 1000 100 49.1±0.78µs 49.4±0.30µs 19.9 Ktx/sec 19.8 Ktx/sec
sqlite 🧠 person multi_index 0 100 107.6±0.41µs 107.0±0.24µs 9.1 Ktx/sec 9.1 Ktx/sec
sqlite 🧠 person multi_index 1000 100 190.2±0.36µs 189.4±0.32µs 5.1 Ktx/sec 5.2 Ktx/sec
sqlite 🧠 person non_unique 0 100 43.0±0.29µs 43.6±0.22µs 22.7 Ktx/sec 22.4 Ktx/sec
sqlite 🧠 person non_unique 1000 100 45.5±0.54µs 46.4±0.16µs 21.5 Ktx/sec 21.0 Ktx/sec
sqlite 🧠 person unique 0 100 44.5±0.45µs 43.6±0.52µs 22.0 Ktx/sec 22.4 Ktx/sec
sqlite 🧠 person unique 1000 100 48.2±0.76µs 48.1±0.23µs 20.3 Ktx/sec 20.3 Ktx/sec
stdb_module 💿 location multi_index 0 100 867.5±19.18µs 814.5±21.48µs 1152 tx/sec 1227 tx/sec
stdb_module 💿 location multi_index 1000 100 845.0±41.68µs 903.3±91.64µs 1183 tx/sec 1107 tx/sec
stdb_module 💿 location non_unique 0 100 449.0±15.91µs 471.7±20.97µs 2.2 Ktx/sec 2.1 Ktx/sec
stdb_module 💿 location non_unique 1000 100 522.4±46.78µs 579.0±9.17µs 1914 tx/sec 1727 tx/sec
stdb_module 💿 location unique 0 100 621.2±56.03µs 614.1±56.79µs 1609 tx/sec 1628 tx/sec
stdb_module 💿 location unique 1000 100 777.3±68.64µs 873.4±12.61µs 1286 tx/sec 1144 tx/sec
stdb_module 💿 person multi_index 0 100 1129.3±184.78µs 1059.5±175.50µs 885 tx/sec 943 tx/sec
stdb_module 💿 person multi_index 1000 100 1152.5±34.08µs 1136.0±43.11µs 867 tx/sec 880 tx/sec
stdb_module 💿 person non_unique 0 100 611.1±65.25µs 467.7±37.74µs 1636 tx/sec 2.1 Ktx/sec
stdb_module 💿 person non_unique 1000 100 785.2±69.46µs 874.7±28.44µs 1273 tx/sec 1143 tx/sec
stdb_module 💿 person unique 0 100 793.8±66.48µs 741.0±72.60µs 1259 tx/sec 1349 tx/sec
stdb_module 💿 person unique 1000 100 735.1±70.19µs 922.2±81.64µs 1360 tx/sec 1084 tx/sec
stdb_module 🧠 location multi_index 0 100 701.9±103.43µs 605.3±81.51µs 1424 tx/sec 1652 tx/sec
stdb_module 🧠 location multi_index 1000 100 780.4±7.23µs 850.8±133.91µs 1281 tx/sec 1175 tx/sec
stdb_module 🧠 location non_unique 0 100 369.2±6.86µs 370.3±10.23µs 2.6 Ktx/sec 2.6 Ktx/sec
stdb_module 🧠 location non_unique 1000 100 495.4±5.02µs 478.1±20.02µs 2018 tx/sec 2.0 Ktx/sec
stdb_module 🧠 location unique 0 100 413.4±26.23µs 421.5±60.51µs 2.4 Ktx/sec 2.3 Ktx/sec
stdb_module 🧠 location unique 1000 100 643.8±17.02µs 645.7±143.47µs 1553 tx/sec 1548 tx/sec
stdb_module 🧠 person multi_index 0 100 797.0±6.74µs 859.1±3.32µs 1254 tx/sec 1164 tx/sec
stdb_module 🧠 person multi_index 1000 100 990.7±4.80µs 1040.5±36.63µs 1009 tx/sec 961 tx/sec
stdb_module 🧠 person non_unique 0 100 372.5±1.58µs 303.3±23.12µs 2.6 Ktx/sec 3.2 Ktx/sec
stdb_module 🧠 person non_unique 1000 100 462.7±44.94µs 453.5±7.36µs 2.1 Ktx/sec 2.2 Ktx/sec
stdb_module 🧠 person unique 0 100 510.8±14.06µs 507.5±12.51µs 1957 tx/sec 1970 tx/sec
stdb_module 🧠 person unique 1000 100 681.0±2.04µs 598.6±24.59µs 1468 tx/sec 1670 tx/sec
stdb_raw 💿 location multi_index 0 100 343.1±9.80µs 334.1±10.79µs 2.8 Ktx/sec 2.9 Ktx/sec
stdb_raw 💿 location multi_index 1000 100 394.1±274.07µs 357.1±1.29µs 2.5 Ktx/sec 2.7 Ktx/sec
stdb_raw 💿 location non_unique 0 100 120.8±0.25µs 121.0±0.28µs 8.1 Ktx/sec 8.1 Ktx/sec
stdb_raw 💿 location non_unique 1000 100 133.8±113.76µs 122.6±0.93µs 7.3 Ktx/sec 8.0 Ktx/sec
stdb_raw 💿 location unique 0 100 243.3±0.80µs 242.8±2.58µs 4.0 Ktx/sec 4.0 Ktx/sec
stdb_raw 💿 location unique 1000 100 260.8±1.29µs 279.3±188.14µs 3.7 Ktx/sec 3.5 Ktx/sec
stdb_raw 💿 person multi_index 0 100 705.6±1.37µs 697.8±4.94µs 1417 tx/sec 1433 tx/sec
stdb_raw 💿 person multi_index 1000 100 774.9±370.91µs 726.0±1.29µs 1290 tx/sec 1377 tx/sec
stdb_raw 💿 person non_unique 0 100 220.1±2.16µs 219.8±0.27µs 4.4 Ktx/sec 4.4 Ktx/sec
stdb_raw 💿 person non_unique 1000 100 222.8±0.95µs 223.5±0.37µs 4.4 Ktx/sec 4.4 Ktx/sec
stdb_raw 💿 person unique 0 100 429.7±0.86µs 427.1±1.58µs 2.3 Ktx/sec 2.3 Ktx/sec
stdb_raw 💿 person unique 1000 100 446.6±0.74µs 444.9±0.54µs 2.2 Ktx/sec 2.2 Ktx/sec
stdb_raw 🧠 location multi_index 0 100 293.2±0.38µs 285.3±0.30µs 3.3 Ktx/sec 3.4 Ktx/sec
stdb_raw 🧠 location multi_index 1000 100 317.2±0.42µs 310.3±0.45µs 3.1 Ktx/sec 3.1 Ktx/sec
stdb_raw 🧠 location non_unique 0 100 74.3±0.13µs 74.2±0.81µs 13.1 Ktx/sec 13.2 Ktx/sec
stdb_raw 🧠 location non_unique 1000 100 75.3±0.11µs 75.5±0.22µs 13.0 Ktx/sec 12.9 Ktx/sec
stdb_raw 🧠 location unique 0 100 196.2±0.26µs 197.1±0.37µs 5.0 Ktx/sec 5.0 Ktx/sec
stdb_raw 🧠 location unique 1000 100 214.6±0.39µs 214.4±0.53µs 4.6 Ktx/sec 4.6 Ktx/sec
stdb_raw 🧠 person multi_index 0 100 618.0±0.40µs 602.0±0.54µs 1618 tx/sec 1661 tx/sec
stdb_raw 🧠 person multi_index 1000 100 646.4±0.92µs 631.4±1.74µs 1547 tx/sec 1583 tx/sec
stdb_raw 🧠 person non_unique 0 100 126.5±0.09µs 126.8±0.20µs 7.7 Ktx/sec 7.7 Ktx/sec
stdb_raw 🧠 person non_unique 1000 100 128.6±0.35µs 128.6±0.41µs 7.6 Ktx/sec 7.6 Ktx/sec
stdb_raw 🧠 person unique 0 100 335.8±0.51µs 334.5±0.51µs 2.9 Ktx/sec 2.9 Ktx/sec
stdb_raw 🧠 person unique 1000 100 352.2±0.29µs 351.3±0.91µs 2.8 Ktx/sec 2.8 Ktx/sec

Full table iterate

db on disk schema index type new latency old latency new throughput old throughput
sqlite 💿 location unique 9.0±0.05µs 9.0±0.12µs 107.9 Ktx/sec 108.6 Ktx/sec
sqlite 💿 person unique 9.2±0.11µs 9.4±0.08µs 106.1 Ktx/sec 103.5 Ktx/sec
sqlite 🧠 location unique 7.9±0.05µs 7.9±0.06µs 123.3 Ktx/sec 123.6 Ktx/sec
sqlite 🧠 person unique 8.2±0.07µs 8.2±0.09µs 119.1 Ktx/sec 118.5 Ktx/sec
stdb_module 💿 location unique 49.7±8.96µs 50.2±8.18µs 19.6 Ktx/sec 19.5 Ktx/sec
stdb_module 💿 person unique 57.2±10.72µs 57.0±11.50µs 17.1 Ktx/sec 17.1 Ktx/sec
stdb_module 🧠 location unique 48.2±8.33µs 50.1±6.93µs 20.3 Ktx/sec 19.5 Ktx/sec
stdb_module 🧠 person unique 60.7±11.30µs 56.2±11.77µs 16.1 Ktx/sec 17.4 Ktx/sec
stdb_raw 💿 location unique 9.1±0.01µs 9.0±0.03µs 107.5 Ktx/sec 109.0 Ktx/sec
stdb_raw 💿 person unique 9.1±0.01µs 9.0±0.28µs 107.5 Ktx/sec 108.6 Ktx/sec
stdb_raw 🧠 location unique 9.0±0.01µs 8.9±0.05µs 108.0 Ktx/sec 109.7 Ktx/sec
stdb_raw 🧠 person unique 9.1±0.39µs 8.9±0.02µs 107.3 Ktx/sec 109.8 Ktx/sec

Find unique key

db on disk key type load new latency old latency new throughput old throughput
sqlite 💿 u32 1000 2.3±0.01µs 2.3±0.01µs 420.1 Ktx/sec 419.7 Ktx/sec
sqlite 🧠 u32 1000 1138.4±3.64ns 1124.5±3.79ns 857.8 Ktx/sec 868.4 Ktx/sec
stdb_module 💿 u32 1000 30.6±1.98µs 31.0±2.57µs 31.9 Ktx/sec 31.5 Ktx/sec
stdb_module 🧠 u32 1000 30.5±2.24µs 29.8±2.13µs 32.0 Ktx/sec 32.8 Ktx/sec
stdb_raw 💿 u32 1000 2.2±0.01µs 2.2±0.01µs 437.4 Ktx/sec 438.3 Ktx/sec
stdb_raw 🧠 u32 1000 2.2±0.00µs 2.2±0.00µs 452.1 Ktx/sec 452.7 Ktx/sec

Filter

db on disk key type index strategy load count new latency old latency new throughput old throughput
sqlite 💿 string indexed 1000 10 5.6±0.01µs 5.6±0.02µs 175.8 Ktx/sec 175.5 Ktx/sec
sqlite 💿 string non_indexed 1000 10 50.7±0.41µs 50.5±0.41µs 19.3 Ktx/sec 19.3 Ktx/sec
sqlite 💿 u64 indexed 1000 10 5.4±0.02µs 5.4±0.02µs 180.8 Ktx/sec 182.1 Ktx/sec
sqlite 💿 u64 non_indexed 1000 10 33.2±0.08µs 33.4±0.12µs 29.4 Ktx/sec 29.2 Ktx/sec
sqlite 🧠 string indexed 1000 10 4.2±0.02µs 4.2±0.01µs 234.8 Ktx/sec 234.3 Ktx/sec
sqlite 🧠 string non_indexed 1000 10 49.2±0.42µs 49.1±0.30µs 19.9 Ktx/sec 19.9 Ktx/sec
sqlite 🧠 u64 indexed 1000 10 4.0±0.01µs 4.0±0.01µs 244.3 Ktx/sec 244.2 Ktx/sec
sqlite 🧠 u64 non_indexed 1000 10 31.9±0.09µs 31.8±0.07µs 30.6 Ktx/sec 30.8 Ktx/sec
stdb_module 💿 string indexed 1000 10 40.1±4.11µs 39.7±3.60µs 24.3 Ktx/sec 24.6 Ktx/sec
stdb_module 💿 string non_indexed 1000 10 163.3±1.74µs 164.8±0.71µs 6.0 Ktx/sec 5.9 Ktx/sec
stdb_module 💿 u64 indexed 1000 10 38.1±3.89µs 36.1±2.51µs 25.6 Ktx/sec 27.0 Ktx/sec
stdb_module 💿 u64 non_indexed 1000 10 133.1±1.67µs 131.2±0.55µs 7.3 Ktx/sec 7.4 Ktx/sec
stdb_module 🧠 string indexed 1000 10 39.1±2.56µs 38.0±2.39µs 25.0 Ktx/sec 25.7 Ktx/sec
stdb_module 🧠 string non_indexed 1000 10 165.6±4.24µs 174.6±6.87µs 5.9 Ktx/sec 5.6 Ktx/sec
stdb_module 🧠 u64 indexed 1000 10 36.3±2.73µs 36.7±2.63µs 26.9 Ktx/sec 26.6 Ktx/sec
stdb_module 🧠 u64 non_indexed 1000 10 132.0±0.95µs 133.1±1.11µs 7.4 Ktx/sec 7.3 Ktx/sec
stdb_raw 💿 string indexed 1000 10 4.9±0.02µs 4.9±0.01µs 200.3 Ktx/sec 200.2 Ktx/sec
stdb_raw 💿 string non_indexed 1000 10 120.7±0.42µs 125.6±0.26µs 8.1 Ktx/sec 7.8 Ktx/sec
stdb_raw 💿 u64 indexed 1000 10 4.8±0.02µs 4.8±0.02µs 204.3 Ktx/sec 204.2 Ktx/sec
stdb_raw 💿 u64 non_indexed 1000 10 105.3±0.10µs 100.1±0.10µs 9.3 Ktx/sec 9.8 Ktx/sec
stdb_raw 🧠 string indexed 1000 10 4.8±0.01µs 4.8±0.01µs 203.4 Ktx/sec 203.4 Ktx/sec
stdb_raw 🧠 string non_indexed 1000 10 120.3±0.26µs 124.9±0.17µs 8.1 Ktx/sec 7.8 Ktx/sec
stdb_raw 🧠 u64 indexed 1000 10 4.7±0.05µs 4.7±0.01µs 206.4 Ktx/sec 207.4 Ktx/sec
stdb_raw 🧠 u64 non_indexed 1000 10 105.4±0.33µs 100.2±1.13µs 9.3 Ktx/sec 9.7 Ktx/sec

Serialize

schema format count new latency old latency new throughput old throughput
location bsatn 100 1667.4±92.55ns 1616.9±28.12ns 57.2 Mtx/sec 59.0 Mtx/sec
location json 100 3.4±0.05µs 3.2±0.03µs 28.2 Mtx/sec 29.9 Mtx/sec
location product_value 100 550.2±2.17ns 548.6±0.62ns 173.3 Mtx/sec 173.8 Mtx/sec
person bsatn 100 2.8±0.02µs 2.8±0.00µs 34.2 Mtx/sec 34.1 Mtx/sec
person json 100 5.1±0.02µs 4.9±0.03µs 18.8 Mtx/sec 19.5 Mtx/sec
person product_value 100 667.4±17.13ns 666.1±6.60ns 142.9 Mtx/sec 143.2 Mtx/sec

Module: invoke with large arguments

arg size new latency old latency new throughput old throughput
64KiB 56.8±7.14µs 58.2±6.37µs - -

Module: print bulk

line count new latency old latency new throughput old throughput
1 29.7±2.58µs 29.2±2.43µs - -
100 202.4±4.14µs 198.5±1.73µs - -
1000 1854.0±59.68µs 1910.8±712.34µs - -

Remaining benchmarks

name new latency old latency new throughput old throughput

Please sign in to comment.