Skip to content

Commit

Permalink
Make datastore public for use in the cutlery crate
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutiertyler committed Feb 7, 2024
1 parent bda431c commit b622c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/core/src/db/datastore/locking_tx_datastore/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![forbid(unsafe_op_in_unsafe_fn)]

pub(crate) mod committed_state;
pub(crate) mod datastore;
pub mod datastore;
pub(crate) mod mut_tx;
pub use mut_tx::MutTxId;
pub(crate) mod sequence;
Expand Down

2 comments on commit b622c28

@github-actions
Copy link

@github-actions github-actions bot commented on b622c28 Feb 7, 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 💿 439.6±2.47ns 446.5±3.15ns - -
sqlite 🧠 429.6±1.81ns 436.4±2.29ns - -
stdb_module 💿 37.5±3.55µs 34.6±3.00µs - -
stdb_module 🧠 35.5±2.39µs 34.9±2.00µs - -
stdb_raw 💿 929.6±1.81ns 933.7±3.08ns - -
stdb_raw 🧠 876.6±0.79ns 880.9±1.45ns - -

Single-row insertions

db on disk schema index type load new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 14.4±0.03µs 14.5±0.04µs 67.7 Ktx/sec 67.5 Ktx/sec
sqlite 💿 location multi_index 1000 15.6±0.09µs 15.7±0.15µs 62.5 Ktx/sec 62.0 Ktx/sec
sqlite 💿 location non_unique 0 7.1±0.26µs 7.1±0.04µs 136.9 Ktx/sec 136.9 Ktx/sec
sqlite 💿 location non_unique 1000 7.0±0.04µs 7.0±0.03µs 139.7 Ktx/sec 139.2 Ktx/sec
sqlite 💿 location unique 0 7.2±0.96µs 7.1±0.03µs 135.2 Ktx/sec 137.2 Ktx/sec
sqlite 💿 location unique 1000 7.0±0.04µs 7.0±0.04µs 139.4 Ktx/sec 138.9 Ktx/sec
sqlite 💿 person multi_index 0 14.2±0.03µs 14.3±0.05µs 68.5 Ktx/sec 68.4 Ktx/sec
sqlite 💿 person multi_index 1000 16.0±0.18µs 16.1±0.30µs 60.9 Ktx/sec 60.8 Ktx/sec
sqlite 💿 person non_unique 0 7.2±0.03µs 7.2±0.43µs 136.0 Ktx/sec 134.9 Ktx/sec
sqlite 💿 person non_unique 1000 7.2±0.05µs 7.2±0.03µs 135.7 Ktx/sec 135.3 Ktx/sec
sqlite 💿 person unique 0 7.2±0.04µs 7.2±0.04µs 136.3 Ktx/sec 134.8 Ktx/sec
sqlite 💿 person unique 1000 7.2±0.05µs 7.3±0.06µs 135.6 Ktx/sec 134.5 Ktx/sec
sqlite 🧠 location multi_index 0 4.0±0.01µs 4.1±0.01µs 241.4 Ktx/sec 239.1 Ktx/sec
sqlite 🧠 location multi_index 1000 5.2±0.04µs 5.3±0.06µs 188.4 Ktx/sec 185.1 Ktx/sec
sqlite 🧠 location non_unique 0 1819.0±6.25ns 1827.9±7.61ns 536.9 Ktx/sec 534.3 Ktx/sec
sqlite 🧠 location non_unique 1000 1873.8±9.06ns 1881.3±12.69ns 521.2 Ktx/sec 519.1 Ktx/sec
sqlite 🧠 location unique 0 1810.1±14.90ns 1809.8±5.65ns 539.5 Ktx/sec 539.6 Ktx/sec
sqlite 🧠 location unique 1000 1941.7±8.88ns 1924.4±7.43ns 502.9 Ktx/sec 507.5 Ktx/sec
sqlite 🧠 person multi_index 0 3.6±0.01µs 3.7±0.01µs 268.6 Ktx/sec 263.1 Ktx/sec
sqlite 🧠 person multi_index 1000 5.5±0.03µs 5.5±0.03µs 176.7 Ktx/sec 178.1 Ktx/sec
sqlite 🧠 person non_unique 0 1889.8±9.80ns 1919.0±5.71ns 516.8 Ktx/sec 508.9 Ktx/sec
sqlite 🧠 person non_unique 1000 1942.5±18.40ns 1986.6±12.02ns 502.7 Ktx/sec 491.6 Ktx/sec
sqlite 🧠 person unique 0 1881.1±6.73ns 1877.9±7.23ns 519.2 Ktx/sec 520.0 Ktx/sec
sqlite 🧠 person unique 1000 2.0±0.02µs 2.0±0.01µs 487.2 Ktx/sec 483.1 Ktx/sec
stdb_module 💿 location multi_index 0 71.9±4.58µs 73.8±5.69µs 13.6 Ktx/sec 13.2 Ktx/sec
stdb_module 💿 location multi_index 1000 157.9±14.80µs 208.8±5.37µs 6.2 Ktx/sec 4.7 Ktx/sec
stdb_module 💿 location non_unique 0 71.2±5.23µs 63.2±7.26µs 13.7 Ktx/sec 15.5 Ktx/sec
stdb_module 💿 location non_unique 1000 163.4±3.48µs 133.7±6.29µs 6.0 Ktx/sec 7.3 Ktx/sec
stdb_module 💿 location unique 0 71.4±3.75µs 68.5±6.19µs 13.7 Ktx/sec 14.2 Ktx/sec
stdb_module 💿 location unique 1000 195.7±7.11µs 133.9±2.97µs 5.0 Ktx/sec 7.3 Ktx/sec
stdb_module 💿 person multi_index 0 80.9±5.70µs 80.7±7.70µs 12.1 Ktx/sec 12.1 Ktx/sec
stdb_module 💿 person multi_index 1000 179.4±4.59µs 246.6±5.09µs 5.4 Ktx/sec 4.0 Ktx/sec
stdb_module 💿 person non_unique 0 77.0±4.29µs 78.5±6.97µs 12.7 Ktx/sec 12.4 Ktx/sec
stdb_module 💿 person non_unique 1000 237.9±12.71µs 170.3±5.97µs 4.1 Ktx/sec 5.7 Ktx/sec
stdb_module 💿 person unique 0 81.5±4.78µs 78.2±4.75µs 12.0 Ktx/sec 12.5 Ktx/sec
stdb_module 💿 person unique 1000 203.4±2.96µs 174.6±3.12µs 4.8 Ktx/sec 5.6 Ktx/sec
stdb_module 🧠 location multi_index 0 61.8±5.12µs 56.8±7.90µs 15.8 Ktx/sec 17.2 Ktx/sec
stdb_module 🧠 location multi_index 1000 151.3±1.37µs 142.8±16.17µs 6.5 Ktx/sec 6.8 Ktx/sec
stdb_module 🧠 location non_unique 0 56.5±4.99µs 55.4±5.43µs 17.3 Ktx/sec 17.6 Ktx/sec
stdb_module 🧠 location non_unique 1000 140.0±3.92µs 129.0±7.57µs 7.0 Ktx/sec 7.6 Ktx/sec
stdb_module 🧠 location unique 0 58.3±6.38µs 55.3±5.05µs 16.8 Ktx/sec 17.7 Ktx/sec
stdb_module 🧠 location unique 1000 159.3±5.99µs 159.7±20.40µs 6.1 Ktx/sec 6.1 Ktx/sec
stdb_module 🧠 person multi_index 0 59.3±6.63µs 62.1±6.48µs 16.5 Ktx/sec 15.7 Ktx/sec
stdb_module 🧠 person multi_index 1000 226.8±11.83µs 111.9±4.45µs 4.3 Ktx/sec 8.7 Ktx/sec
stdb_module 🧠 person non_unique 0 58.7±5.10µs 59.4±5.62µs 16.6 Ktx/sec 16.4 Ktx/sec
stdb_module 🧠 person non_unique 1000 181.3±40.73µs 166.4±7.87µs 5.4 Ktx/sec 5.9 Ktx/sec
stdb_module 🧠 person unique 0 57.5±6.12µs 58.3±6.37µs 17.0 Ktx/sec 16.7 Ktx/sec
stdb_module 🧠 person unique 1000 116.0±6.55µs 146.8±3.04µs 8.4 Ktx/sec 6.7 Ktx/sec
stdb_raw 💿 location multi_index 0 6.0±0.03µs 6.1±0.37µs 163.3 Ktx/sec 161.2 Ktx/sec
stdb_raw 💿 location multi_index 1000 19.0±100.88µs 22.0±129.86µs 51.3 Ktx/sec 44.4 Ktx/sec
stdb_raw 💿 location non_unique 0 5.4±0.21µs 5.4±0.48µs 182.1 Ktx/sec 179.7 Ktx/sec
stdb_raw 💿 location non_unique 1000 7.4±0.21µs 17.4±98.69µs 131.8 Ktx/sec 56.0 Ktx/sec
stdb_raw 💿 location unique 0 5.8±0.02µs 5.9±0.02µs 167.9 Ktx/sec 165.0 Ktx/sec
stdb_raw 💿 location unique 1000 8.6±0.14µs 20.6±119.17µs 113.2 Ktx/sec 47.3 Ktx/sec
stdb_raw 💿 person multi_index 0 7.3±0.08µs 7.4±0.02µs 133.4 Ktx/sec 132.5 Ktx/sec
stdb_raw 💿 person multi_index 1000 10.9±0.11µs 31.7±207.49µs 89.2 Ktx/sec 30.8 Ktx/sec
stdb_raw 💿 person non_unique 0 6.7±0.28µs 6.7±0.01µs 146.3 Ktx/sec 146.7 Ktx/sec
stdb_raw 💿 person non_unique 1000 25.2±162.83µs 9.1±0.09µs 38.7 Ktx/sec 107.6 Ktx/sec
stdb_raw 💿 person unique 0 7.1±0.39µs 7.1±0.03µs 137.3 Ktx/sec 136.8 Ktx/sec
stdb_raw 💿 person unique 1000 10.1±0.17µs 30.1±195.98µs 96.2 Ktx/sec 32.5 Ktx/sec
stdb_raw 🧠 location multi_index 0 3.4±0.01µs 3.3±0.01µs 288.3 Ktx/sec 292.1 Ktx/sec
stdb_raw 🧠 location multi_index 1000 5.0±0.03µs 4.9±0.06µs 196.1 Ktx/sec 200.6 Ktx/sec
stdb_raw 🧠 location non_unique 0 2.8±0.01µs 2.8±0.01µs 344.4 Ktx/sec 344.6 Ktx/sec
stdb_raw 🧠 location non_unique 1000 3.6±0.03µs 3.5±0.09µs 272.8 Ktx/sec 276.2 Ktx/sec
stdb_raw 🧠 location unique 0 3.2±0.01µs 3.3±0.01µs 301.3 Ktx/sec 300.3 Ktx/sec
stdb_raw 🧠 location unique 1000 4.6±0.04µs 4.5±0.03µs 212.8 Ktx/sec 214.9 Ktx/sec
stdb_raw 🧠 person multi_index 0 4.2±0.01µs 4.1±0.03µs 234.9 Ktx/sec 235.4 Ktx/sec
stdb_raw 🧠 person multi_index 1000 6.2±0.05µs 6.2±0.04µs 158.0 Ktx/sec 158.4 Ktx/sec
stdb_raw 🧠 person non_unique 0 3.4±0.01µs 3.5±0.02µs 283.9 Ktx/sec 278.2 Ktx/sec
stdb_raw 🧠 person non_unique 1000 4.4±0.03µs 4.5±0.02µs 221.4 Ktx/sec 218.6 Ktx/sec
stdb_raw 🧠 person unique 0 3.9±0.02µs 3.9±0.01µs 249.7 Ktx/sec 248.4 Ktx/sec
stdb_raw 🧠 person unique 1000 5.5±0.06µs 5.5±0.04µs 178.4 Ktx/sec 178.7 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 130.9±3.68µs 129.7±0.47µs 7.5 Ktx/sec 7.5 Ktx/sec
sqlite 💿 location multi_index 1000 100 201.9±1.79µs 201.5±1.42µs 4.8 Ktx/sec 4.8 Ktx/sec
sqlite 💿 location non_unique 0 100 48.3±1.29µs 49.3±0.23µs 20.2 Ktx/sec 19.8 Ktx/sec
sqlite 💿 location non_unique 1000 100 51.6±0.46µs 51.3±0.36µs 18.9 Ktx/sec 19.0 Ktx/sec
sqlite 💿 location unique 0 100 50.2±1.46µs 50.6±1.28µs 19.5 Ktx/sec 19.3 Ktx/sec
sqlite 💿 location unique 1000 100 55.4±0.24µs 54.9±0.31µs 17.6 Ktx/sec 17.8 Ktx/sec
sqlite 💿 person multi_index 0 100 116.1±3.18µs 116.9±2.87µs 8.4 Ktx/sec 8.4 Ktx/sec
sqlite 💿 person multi_index 1000 100 227.8±0.83µs 231.4±2.83µs 4.3 Ktx/sec 4.2 Ktx/sec
sqlite 💿 person non_unique 0 100 47.0±0.82µs 47.0±6.43µs 20.8 Ktx/sec 20.8 Ktx/sec
sqlite 💿 person non_unique 1000 100 58.7±0.32µs 59.2±0.26µs 16.6 Ktx/sec 16.5 Ktx/sec
sqlite 💿 person unique 0 100 48.5±0.20µs 49.0±3.15µs 20.1 Ktx/sec 19.9 Ktx/sec
sqlite 💿 person unique 1000 100 54.0±0.27µs 55.4±0.25µs 18.1 Ktx/sec 17.6 Ktx/sec
sqlite 🧠 location multi_index 0 100 117.8±0.35µs 116.8±0.36µs 8.3 Ktx/sec 8.4 Ktx/sec
sqlite 🧠 location multi_index 1000 100 168.3±0.37µs 168.5±0.55µs 5.8 Ktx/sec 5.8 Ktx/sec
sqlite 🧠 location non_unique 0 100 41.8±0.32µs 42.6±0.33µs 23.4 Ktx/sec 22.9 Ktx/sec
sqlite 🧠 location non_unique 1000 100 43.8±0.29µs 44.0±0.20µs 22.3 Ktx/sec 22.2 Ktx/sec
sqlite 🧠 location unique 0 100 43.7±0.65µs 43.5±0.30µs 22.4 Ktx/sec 22.4 Ktx/sec
sqlite 🧠 location unique 1000 100 48.5±0.29µs 47.2±0.30µs 20.1 Ktx/sec 20.7 Ktx/sec
sqlite 🧠 person multi_index 0 100 105.4±0.37µs 104.1±0.30µs 9.3 Ktx/sec 9.4 Ktx/sec
sqlite 🧠 person multi_index 1000 100 188.4±0.45µs 188.8±0.24µs 5.2 Ktx/sec 5.2 Ktx/sec
sqlite 🧠 person non_unique 0 100 40.3±0.32µs 39.5±0.25µs 24.2 Ktx/sec 24.7 Ktx/sec
sqlite 🧠 person non_unique 1000 100 44.1±0.38µs 44.5±0.25µs 22.2 Ktx/sec 22.0 Ktx/sec
sqlite 🧠 person unique 0 100 41.6±0.28µs 42.3±0.26µs 23.5 Ktx/sec 23.1 Ktx/sec
sqlite 🧠 person unique 1000 100 46.8±0.23µs 46.3±0.20µs 20.9 Ktx/sec 21.1 Ktx/sec
stdb_module 💿 location multi_index 0 100 547.2±3.20µs 529.0±9.59µs 1827 tx/sec 1890 tx/sec
stdb_module 💿 location multi_index 1000 100 638.7±6.97µs 556.8±10.29µs 1565 tx/sec 1796 tx/sec
stdb_module 💿 location non_unique 0 100 464.3±1.78µs 512.0±51.76µs 2.1 Ktx/sec 1953 tx/sec
stdb_module 💿 location non_unique 1000 100 501.6±5.34µs 536.8±45.37µs 1993 tx/sec 1862 tx/sec
stdb_module 💿 location unique 0 100 545.3±20.82µs 561.7±28.80µs 1834 tx/sec 1780 tx/sec
stdb_module 💿 location unique 1000 100 580.0±3.81µs 614.9±8.73µs 1724 tx/sec 1626 tx/sec
stdb_module 💿 person multi_index 0 100 860.4±3.57µs 902.2±14.62µs 1162 tx/sec 1108 tx/sec
stdb_module 💿 person multi_index 1000 100 927.6±4.84µs 1010.3±40.23µs 1078 tx/sec 989 tx/sec
stdb_module 💿 person non_unique 0 100 722.2±3.07µs 769.9±4.14µs 1384 tx/sec 1298 tx/sec
stdb_module 💿 person non_unique 1000 100 795.5±7.81µs 833.6±4.23µs 1256 tx/sec 1199 tx/sec
stdb_module 💿 person unique 0 100 788.9±4.25µs 833.1±2.41µs 1267 tx/sec 1200 tx/sec
stdb_module 💿 person unique 1000 100 887.4±12.11µs 912.5±3.75µs 1126 tx/sec 1095 tx/sec
stdb_module 🧠 location multi_index 0 100 484.9±14.58µs 464.6±12.60µs 2.0 Ktx/sec 2.1 Ktx/sec
stdb_module 🧠 location multi_index 1000 100 390.4±2.08µs 509.1±29.82µs 2.5 Ktx/sec 1964 tx/sec
stdb_module 🧠 location non_unique 0 100 364.8±62.85µs 394.6±28.76µs 2.7 Ktx/sec 2.5 Ktx/sec
stdb_module 🧠 location non_unique 1000 100 410.3±24.73µs 350.4±60.34µs 2.4 Ktx/sec 2.8 Ktx/sec
stdb_module 🧠 location unique 0 100 346.0±20.51µs 372.4±36.25µs 2.8 Ktx/sec 2.6 Ktx/sec
stdb_module 🧠 location unique 1000 100 446.2±31.09µs 488.7±60.30µs 2.2 Ktx/sec 2046 tx/sec
stdb_module 🧠 person multi_index 0 100 635.5±7.91µs 646.6±18.67µs 1573 tx/sec 1546 tx/sec
stdb_module 🧠 person multi_index 1000 100 692.8±7.95µs 755.8±9.10µs 1443 tx/sec 1323 tx/sec
stdb_module 🧠 person non_unique 0 100 543.0±2.17µs 476.3±25.27µs 1841 tx/sec 2.1 Ktx/sec
stdb_module 🧠 person non_unique 1000 100 603.0±7.05µs 604.7±2.65µs 1658 tx/sec 1653 tx/sec
stdb_module 🧠 person unique 0 100 609.8±3.88µs 564.2±12.41µs 1639 tx/sec 1772 tx/sec
stdb_module 🧠 person unique 1000 100 700.5±15.55µs 561.0±12.58µs 1427 tx/sec 1782 tx/sec
stdb_raw 💿 location multi_index 0 100 162.4±0.25µs 167.6±24.17µs 6.0 Ktx/sec 5.8 Ktx/sec
stdb_raw 💿 location multi_index 1000 100 192.4±146.02µs 179.9±1.18µs 5.1 Ktx/sec 5.4 Ktx/sec
stdb_raw 💿 location non_unique 0 100 125.5±0.20µs 128.0±0.09µs 7.8 Ktx/sec 7.6 Ktx/sec
stdb_raw 💿 location non_unique 1000 100 127.8±1.03µs 130.5±1.02µs 7.6 Ktx/sec 7.5 Ktx/sec
stdb_raw 💿 location unique 0 100 160.0±0.79µs 163.0±3.22µs 6.1 Ktx/sec 6.0 Ktx/sec
stdb_raw 💿 location unique 1000 100 166.4±0.96µs 168.9±1.11µs 5.9 Ktx/sec 5.8 Ktx/sec
stdb_raw 💿 person multi_index 0 100 277.9±9.49µs 276.5±9.78µs 3.5 Ktx/sec 3.5 Ktx/sec
stdb_raw 💿 person multi_index 1000 100 288.6±0.44µs 306.6±171.82µs 3.4 Ktx/sec 3.2 Ktx/sec
stdb_raw 💿 person non_unique 0 100 216.7±0.29µs 217.9±0.27µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_raw 💿 person non_unique 1000 100 218.9±0.39µs 220.6±0.51µs 4.5 Ktx/sec 4.4 Ktx/sec
stdb_raw 💿 person unique 0 100 254.3±16.56µs 255.3±9.45µs 3.8 Ktx/sec 3.8 Ktx/sec
stdb_raw 💿 person unique 1000 100 260.9±0.77µs 262.3±0.42µs 3.7 Ktx/sec 3.7 Ktx/sec
stdb_raw 🧠 location multi_index 0 100 115.4±0.25µs 116.9±0.19µs 8.5 Ktx/sec 8.4 Ktx/sec
stdb_raw 🧠 location multi_index 1000 100 129.1±0.16µs 130.9±0.20µs 7.6 Ktx/sec 7.5 Ktx/sec
stdb_raw 🧠 location non_unique 0 100 78.6±0.11µs 80.5±0.13µs 12.4 Ktx/sec 12.1 Ktx/sec
stdb_raw 🧠 location non_unique 1000 100 80.4±0.17µs 81.7±0.11µs 12.2 Ktx/sec 12.0 Ktx/sec
stdb_raw 🧠 location unique 0 100 113.3±0.29µs 114.8±0.25µs 8.6 Ktx/sec 8.5 Ktx/sec
stdb_raw 🧠 location unique 1000 100 120.3±0.42µs 121.6±0.19µs 8.1 Ktx/sec 8.0 Ktx/sec
stdb_raw 🧠 person multi_index 0 100 180.4±0.20µs 183.0±0.28µs 5.4 Ktx/sec 5.3 Ktx/sec
stdb_raw 🧠 person multi_index 1000 100 192.5±0.48µs 192.7±0.27µs 5.1 Ktx/sec 5.1 Ktx/sec
stdb_raw 🧠 person non_unique 0 100 122.7±0.14µs 124.3±0.20µs 8.0 Ktx/sec 7.9 Ktx/sec
stdb_raw 🧠 person non_unique 1000 100 123.5±0.19µs 125.5±0.15µs 7.9 Ktx/sec 7.8 Ktx/sec
stdb_raw 🧠 person unique 0 100 159.3±0.52µs 161.0±0.24µs 6.1 Ktx/sec 6.1 Ktx/sec
stdb_raw 🧠 person unique 1000 100 166.3±0.27µs 168.8±0.36µs 5.9 Ktx/sec 5.8 Ktx/sec

Full table iterate

db on disk schema index type new latency old latency new throughput old throughput
sqlite 💿 location unique 8.9±0.16µs 8.9±0.10µs 109.2 Ktx/sec 109.4 Ktx/sec
sqlite 💿 person unique 9.2±0.11µs 9.4±0.07µs 106.3 Ktx/sec 104.3 Ktx/sec
sqlite 🧠 location unique 7.9±0.12µs 7.8±0.13µs 124.0 Ktx/sec 125.9 Ktx/sec
sqlite 🧠 person unique 8.0±0.06µs 8.1±0.08µs 122.3 Ktx/sec 119.9 Ktx/sec
stdb_module 💿 location unique 63.9±6.03µs 66.0±10.04µs 15.3 Ktx/sec 14.8 Ktx/sec
stdb_module 💿 person unique 75.0±5.55µs 75.8±5.02µs 13.0 Ktx/sec 12.9 Ktx/sec
stdb_module 🧠 location unique 64.0±5.62µs 65.0±4.33µs 15.3 Ktx/sec 15.0 Ktx/sec
stdb_module 🧠 person unique 74.7±5.84µs 76.4±5.89µs 13.1 Ktx/sec 12.8 Ktx/sec
stdb_raw 💿 location unique 12.7±0.08µs 12.7±0.08µs 76.9 Ktx/sec 77.2 Ktx/sec
stdb_raw 💿 person unique 13.9±0.14µs 13.9±0.04µs 70.5 Ktx/sec 70.5 Ktx/sec
stdb_raw 🧠 location unique 12.7±0.01µs 12.6±0.06µs 76.9 Ktx/sec 77.6 Ktx/sec
stdb_raw 🧠 person unique 13.9±0.01µs 13.8±0.20µs 70.5 Ktx/sec 70.9 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.02µs 2.3±0.01µs 426.9 Ktx/sec 427.1 Ktx/sec
sqlite 🧠 u32 1000 1098.1±9.14ns 1096.6±9.65ns 889.3 Ktx/sec 890.5 Ktx/sec
stdb_module 💿 u32 1000 42.7±3.98µs 43.7±3.04µs 22.9 Ktx/sec 22.4 Ktx/sec
stdb_module 🧠 u32 1000 40.6±4.68µs 43.1±4.08µs 24.0 Ktx/sec 22.7 Ktx/sec
stdb_raw 💿 u32 1000 1853.9±5.64ns 1848.7±5.31ns 526.8 Ktx/sec 528.2 Ktx/sec
stdb_raw 🧠 u32 1000 1753.9±2.94ns 1758.9±2.94ns 556.8 Ktx/sec 555.2 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.7±0.05µs 5.7±0.03µs 172.1 Ktx/sec 172.1 Ktx/sec
sqlite 💿 string non_indexed 1000 10 49.8±0.39µs 49.5±0.43µs 19.6 Ktx/sec 19.7 Ktx/sec
sqlite 💿 u64 indexed 1000 10 5.4±0.02µs 5.4±0.02µs 179.4 Ktx/sec 179.5 Ktx/sec
sqlite 💿 u64 non_indexed 1000 10 35.0±0.13µs 33.0±0.09µs 27.9 Ktx/sec 29.6 Ktx/sec
sqlite 🧠 string indexed 1000 10 4.3±0.02µs 4.3±0.01µs 228.7 Ktx/sec 227.9 Ktx/sec
sqlite 🧠 string non_indexed 1000 10 48.2±0.60µs 47.8±0.40µs 20.3 Ktx/sec 20.4 Ktx/sec
sqlite 🧠 u64 indexed 1000 10 4.1±0.02µs 4.1±0.02µs 237.9 Ktx/sec 239.2 Ktx/sec
sqlite 🧠 u64 non_indexed 1000 10 31.7±0.05µs 31.7±0.10µs 30.8 Ktx/sec 30.8 Ktx/sec
stdb_module 💿 string indexed 1000 10 48.6±3.66µs 49.9±4.30µs 20.1 Ktx/sec 19.6 Ktx/sec
stdb_module 💿 string non_indexed 1000 10 235.3±1.82µs 235.5±1.40µs 4.1 Ktx/sec 4.1 Ktx/sec
stdb_module 💿 u64 indexed 1000 10 47.0±3.56µs 44.9±3.64µs 20.8 Ktx/sec 21.7 Ktx/sec
stdb_module 💿 u64 non_indexed 1000 10 205.4±2.26µs 204.2±4.52µs 4.8 Ktx/sec 4.8 Ktx/sec
stdb_module 🧠 string indexed 1000 10 49.2±5.16µs 50.4±3.57µs 19.8 Ktx/sec 19.4 Ktx/sec
stdb_module 🧠 string non_indexed 1000 10 231.8±0.86µs 234.5±1.94µs 4.2 Ktx/sec 4.2 Ktx/sec
stdb_module 🧠 u64 indexed 1000 10 48.9±3.88µs 47.4±4.88µs 20.0 Ktx/sec 20.6 Ktx/sec
stdb_module 🧠 u64 non_indexed 1000 10 204.0±2.48µs 206.2±1.35µs 4.8 Ktx/sec 4.7 Ktx/sec
stdb_raw 💿 string indexed 1000 10 2.6±0.00µs 2.6±0.01µs 371.4 Ktx/sec 370.5 Ktx/sec
stdb_raw 💿 string non_indexed 1000 10 182.9±1.84µs 190.8±0.35µs 5.3 Ktx/sec 5.1 Ktx/sec
stdb_raw 💿 u64 indexed 1000 10 2.6±0.01µs 2.6±0.00µs 380.7 Ktx/sec 380.3 Ktx/sec
stdb_raw 💿 u64 non_indexed 1000 10 169.5±0.98µs 164.4±0.23µs 5.8 Ktx/sec 5.9 Ktx/sec
stdb_raw 🧠 string indexed 1000 10 2.5±0.01µs 2.6±0.00µs 383.3 Ktx/sec 381.9 Ktx/sec
stdb_raw 🧠 string non_indexed 1000 10 183.4±0.39µs 191.3±0.81µs 5.3 Ktx/sec 5.1 Ktx/sec
stdb_raw 🧠 u64 indexed 1000 10 2.5±0.00µs 2.5±0.01µs 394.2 Ktx/sec 391.9 Ktx/sec
stdb_raw 🧠 u64 non_indexed 1000 10 168.8±0.73µs 164.2±0.20µs 5.8 Ktx/sec 5.9 Ktx/sec

Serialize

schema format count new latency old latency new throughput old throughput
location bsatn 100 1911.6±44.71ns 1864.5±32.44ns 49.9 Mtx/sec 51.1 Mtx/sec
location json 100 3.1±0.02µs 3.4±0.05µs 30.8 Mtx/sec 28.3 Mtx/sec
location product_value 100 560.0±2.39ns 559.4±1.11ns 170.3 Mtx/sec 170.5 Mtx/sec
person bsatn 100 2.7±0.02µs 2.7±0.01µs 35.5 Mtx/sec 35.6 Mtx/sec
person json 100 5.1±0.09µs 5.1±0.07µs 18.6 Mtx/sec 18.8 Mtx/sec
person product_value 100 629.1±0.42ns 638.4±31.40ns 151.6 Mtx/sec 149.4 Mtx/sec

Module: invoke with large arguments

arg size new latency old latency new throughput old throughput
64KiB 75.5±10.10µs 79.2±7.95µs - -

Module: print bulk

line count new latency old latency new throughput old throughput
1 42.4±4.05µs 43.6±3.90µs - -
100 227.0±18.13µs 220.3±5.79µs - -
1000 1875.0±48.07µs 1855.4±24.66µs - -

Remaining benchmarks

name new latency old latency new throughput old throughput

@github-actions
Copy link

@github-actions github-actions bot commented on b622c28 Feb 7, 2024

Choose a reason for hiding this comment

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

Benchmark results <title>502 Bad Gateway</title>

502 Bad Gateway


nginx

Please sign in to comment.