Skip to content

Commit

Permalink
Nix impl TryFrom<&str> for IndexType (#559)
Browse files Browse the repository at this point in the history
Signed-off-by: Mazdak Farrokhzad <twingoow@gmail.com>
  • Loading branch information
Centril authored Nov 15, 2023
1 parent e5d3f42 commit f017e33
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions crates/sats/src/db/def.rs
Original file line number Diff line number Diff line change
@@ -230,17 +230,6 @@ impl TryFrom<u8> for IndexType {
}
}

impl TryFrom<&str> for IndexType {
type Error = ();
fn try_from(v: &str) -> Result<Self, Self::Error> {
match v {
"BTree" => Ok(IndexType::BTree),
"Hash" => Ok(IndexType::Hash),
_ => Err(()),
}
}
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SequenceSchema {
pub sequence_id: SequenceId,

1 comment on commit f017e33

@github-actions
Copy link

@github-actions github-actions bot commented on f017e33 Nov 15, 2023

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 💿 424.4±0.90ns 435.2±1.22ns - -
sqlite 🧠 422.5±1.29ns 431.7±1.13ns - -
stdb_module 💿 19.2±1.44µs 17.9±0.82µs - -
stdb_module 🧠 19.0±1.56µs 18.2±1.05µs - -
stdb_raw 💿 719.9±5.36ns 717.6±1.67ns - -
stdb_raw 🧠 712.6±3.53ns 713.7±2.05ns - -

Single-row insertions

db on disk schema index type load new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 14.8±0.07µs 14.9±0.72µs 66.0 Ktx/sec 65.6 Ktx/sec
sqlite 💿 location multi_index 1000 15.9±0.25µs 15.9±0.08µs 61.4 Ktx/sec 61.4 Ktx/sec
sqlite 💿 location non_unique 0 7.2±0.04µs 7.3±0.03µs 136.1 Ktx/sec 134.4 Ktx/sec
sqlite 💿 location non_unique 1000 7.1±0.02µs 7.1±0.03µs 138.1 Ktx/sec 137.1 Ktx/sec
sqlite 💿 location unique 0 7.2±0.46µs 7.2±0.08µs 134.7 Ktx/sec 135.7 Ktx/sec
sqlite 💿 location unique 1000 7.1±0.03µs 7.2±0.12µs 137.3 Ktx/sec 135.7 Ktx/sec
sqlite 💿 person multi_index 0 14.7±0.99µs 14.3±0.08µs 66.3 Ktx/sec 68.3 Ktx/sec
sqlite 💿 person multi_index 1000 16.3±0.33µs 16.4±0.13µs 60.0 Ktx/sec 59.7 Ktx/sec
sqlite 💿 person non_unique 0 7.3±0.04µs 7.3±0.51µs 133.5 Ktx/sec 133.0 Ktx/sec
sqlite 💿 person non_unique 1000 7.3±0.05µs 7.3±0.05µs 134.4 Ktx/sec 133.4 Ktx/sec
sqlite 💿 person unique 0 7.4±0.84µs 7.3±0.52µs 132.8 Ktx/sec 133.5 Ktx/sec
sqlite 💿 person unique 1000 7.4±0.05µs 7.4±0.06µs 132.4 Ktx/sec 132.7 Ktx/sec
sqlite 🧠 location multi_index 0 4.0±0.02µs 4.0±0.01µs 243.9 Ktx/sec 242.2 Ktx/sec
sqlite 🧠 location multi_index 1000 5.2±0.11µs 5.2±0.02µs 188.9 Ktx/sec 188.8 Ktx/sec
sqlite 🧠 location non_unique 0 1840.8±5.04ns 1860.5±3.31ns 530.5 Ktx/sec 524.9 Ktx/sec
sqlite 🧠 location non_unique 1000 1897.4±25.69ns 1900.7±6.92ns 514.7 Ktx/sec 513.8 Ktx/sec
sqlite 🧠 location unique 0 1822.8±8.42ns 1856.0±5.67ns 535.8 Ktx/sec 526.2 Ktx/sec
sqlite 🧠 location unique 1000 1963.4±17.32ns 1973.7±5.98ns 497.4 Ktx/sec 494.8 Ktx/sec
sqlite 🧠 person multi_index 0 3.6±0.01µs 3.7±0.01µs 267.9 Ktx/sec 264.9 Ktx/sec
sqlite 🧠 person multi_index 1000 5.5±0.04µs 5.5±0.03µs 176.2 Ktx/sec 177.8 Ktx/sec
sqlite 🧠 person non_unique 0 1902.2±5.66ns 1924.9±4.86ns 513.4 Ktx/sec 507.3 Ktx/sec
sqlite 🧠 person non_unique 1000 1978.0±12.39ns 2.0±0.02µs 493.7 Ktx/sec 483.8 Ktx/sec
sqlite 🧠 person unique 0 1898.6±7.81ns 1933.7±6.29ns 514.4 Ktx/sec 505.0 Ktx/sec
sqlite 🧠 person unique 1000 2.0±0.02µs 2.1±0.01µs 482.2 Ktx/sec 474.8 Ktx/sec
stdb_module 💿 location multi_index 0 58.5±5.18µs 57.0±5.71µs 16.7 Ktx/sec 17.1 Ktx/sec
stdb_module 💿 location multi_index 1000 110.1±22.17µs 104.4±5.77µs 8.9 Ktx/sec 9.4 Ktx/sec
stdb_module 💿 location non_unique 0 46.1±3.93µs 45.8±3.45µs 21.2 Ktx/sec 21.3 Ktx/sec
stdb_module 💿 location non_unique 1000 139.9±44.46µs 125.6±79.94µs 7.0 Ktx/sec 7.8 Ktx/sec
stdb_module 💿 location unique 0 52.8±5.46µs 51.2±5.79µs 18.5 Ktx/sec 19.1 Ktx/sec
stdb_module 💿 location unique 1000 213.1±74.86µs 146.1±100.43µs 4.6 Ktx/sec 6.7 Ktx/sec
stdb_module 💿 person multi_index 0 66.2±5.64µs 63.3±3.80µs 14.7 Ktx/sec 15.4 Ktx/sec
stdb_module 💿 person multi_index 1000 274.2±110.56µs 381.4±7.78µs 3.6 Ktx/sec 2.6 Ktx/sec
stdb_module 💿 person non_unique 0 50.7±7.37µs 42.1±3.63µs 19.3 Ktx/sec 23.2 Ktx/sec
stdb_module 💿 person non_unique 1000 181.9±7.77µs 295.0±52.87µs 5.4 Ktx/sec 3.3 Ktx/sec
stdb_module 💿 person unique 0 57.6±4.35µs 56.7±6.83µs 17.0 Ktx/sec 17.2 Ktx/sec
stdb_module 💿 person unique 1000 236.8±31.63µs 190.3±6.52µs 4.1 Ktx/sec 5.1 Ktx/sec
stdb_module 🧠 location multi_index 0 37.6±3.49µs 37.5±3.95µs 26.0 Ktx/sec 26.0 Ktx/sec
stdb_module 🧠 location multi_index 1000 89.7±9.19µs 176.8±39.23µs 10.9 Ktx/sec 5.5 Ktx/sec
stdb_module 🧠 location non_unique 0 32.9±2.63µs 31.2±2.46µs 29.7 Ktx/sec 31.3 Ktx/sec
stdb_module 🧠 location non_unique 1000 230.5±9.33µs 196.4±12.14µs 4.2 Ktx/sec 5.0 Ktx/sec
stdb_module 🧠 location unique 0 36.2±3.29µs 34.3±3.30µs 27.0 Ktx/sec 28.4 Ktx/sec
stdb_module 🧠 location unique 1000 97.1±15.15µs 93.5±9.62µs 10.1 Ktx/sec 10.4 Ktx/sec
stdb_module 🧠 person multi_index 0 48.7±5.55µs 45.6±4.90µs 20.1 Ktx/sec 21.4 Ktx/sec
stdb_module 🧠 person multi_index 1000 134.1±8.85µs 289.4±3.17µs 7.3 Ktx/sec 3.4 Ktx/sec
stdb_module 🧠 person non_unique 0 33.1±2.57µs 30.5±2.38µs 29.5 Ktx/sec 32.0 Ktx/sec
stdb_module 🧠 person non_unique 1000 329.4±15.43µs 175.6±4.12µs 3.0 Ktx/sec 5.6 Ktx/sec
stdb_module 🧠 person unique 0 37.2±3.83µs 39.8±4.71µs 26.2 Ktx/sec 24.5 Ktx/sec
stdb_module 🧠 person unique 1000 202.6±3.36µs 166.5±10.37µs 4.8 Ktx/sec 5.9 Ktx/sec
stdb_raw 💿 location multi_index 0 7.2±0.01µs 7.3±0.38µs 135.2 Ktx/sec 134.1 Ktx/sec
stdb_raw 💿 location multi_index 1000 31.6±218.01µs 37.4±276.44µs 30.9 Ktx/sec 26.1 Ktx/sec
stdb_raw 💿 location non_unique 0 4.8±0.02µs 4.8±0.01µs 205.0 Ktx/sec 203.0 Ktx/sec
stdb_raw 💿 location non_unique 1000 6.2±0.13µs 6.2±0.16µs 157.1 Ktx/sec 157.3 Ktx/sec
stdb_raw 💿 location unique 0 6.2±0.01µs 6.3±0.34µs 157.9 Ktx/sec 156.2 Ktx/sec
stdb_raw 💿 location unique 1000 27.5±190.14µs 28.8±204.81µs 35.5 Ktx/sec 33.9 Ktx/sec
stdb_raw 💿 person multi_index 0 10.9±0.18µs 11.1±0.44µs 89.6 Ktx/sec 87.9 Ktx/sec
stdb_raw 💿 person multi_index 1000 14.1±0.17µs 55.5±414.09µs 69.5 Ktx/sec 17.6 Ktx/sec
stdb_raw 💿 person non_unique 0 5.3±0.00µs 5.4±0.01µs 182.8 Ktx/sec 181.5 Ktx/sec
stdb_raw 💿 person non_unique 1000 19.1±121.53µs 22.5±155.13µs 51.0 Ktx/sec 43.3 Ktx/sec
stdb_raw 💿 person unique 0 7.7±0.02µs 7.8±0.02µs 126.5 Ktx/sec 125.2 Ktx/sec
stdb_raw 💿 person unique 1000 32.5±222.93µs 38.0±278.33µs 30.0 Ktx/sec 25.7 Ktx/sec
stdb_raw 🧠 location multi_index 0 4.2±0.01µs 4.2±0.01µs 234.4 Ktx/sec 233.7 Ktx/sec
stdb_raw 🧠 location multi_index 1000 5.6±0.09µs 5.7±0.02µs 172.9 Ktx/sec 172.2 Ktx/sec
stdb_raw 🧠 location non_unique 0 1930.1±5.87ns 1916.1±17.37ns 506.0 Ktx/sec 509.6 Ktx/sec
stdb_raw 🧠 location non_unique 1000 2.4±0.02µs 2.4±0.02µs 402.0 Ktx/sec 408.6 Ktx/sec
stdb_raw 🧠 location unique 0 3.1±0.01µs 3.1±0.01µs 311.7 Ktx/sec 311.2 Ktx/sec
stdb_raw 🧠 location unique 1000 4.3±0.03µs 4.2±0.04µs 225.8 Ktx/sec 231.6 Ktx/sec
stdb_raw 🧠 person multi_index 0 7.8±0.02µs 7.9±0.01µs 124.7 Ktx/sec 123.4 Ktx/sec
stdb_raw 🧠 person multi_index 1000 9.8±0.05µs 10.0±0.07µs 99.3 Ktx/sec 98.1 Ktx/sec
stdb_raw 🧠 person non_unique 0 2.5±0.01µs 2.5±0.00µs 397.9 Ktx/sec 395.9 Ktx/sec
stdb_raw 🧠 person non_unique 1000 3.2±0.02µs 3.2±0.02µs 305.9 Ktx/sec 302.0 Ktx/sec
stdb_raw 🧠 person unique 0 4.7±0.01µs 4.8±0.01µs 207.7 Ktx/sec 205.6 Ktx/sec
stdb_raw 🧠 person unique 1000 6.0±0.05µs 6.1±0.04µs 162.5 Ktx/sec 161.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 129.5±6.51µs 131.3±4.48µs 7.5 Ktx/sec 7.4 Ktx/sec
sqlite 💿 location multi_index 1000 100 202.6±25.50µs 202.8±1.52µs 4.8 Ktx/sec 4.8 Ktx/sec
sqlite 💿 location non_unique 0 100 50.3±1.89µs 50.6±1.75µs 19.4 Ktx/sec 19.3 Ktx/sec
sqlite 💿 location non_unique 1000 100 52.9±0.21µs 53.1±0.40µs 18.5 Ktx/sec 18.4 Ktx/sec
sqlite 💿 location unique 0 100 51.7±0.81µs 52.0±1.56µs 18.9 Ktx/sec 18.8 Ktx/sec
sqlite 💿 location unique 1000 100 56.0±0.26µs 56.4±0.35µs 17.5 Ktx/sec 17.3 Ktx/sec
sqlite 💿 person multi_index 0 100 118.1±4.04µs 117.7±3.33µs 8.3 Ktx/sec 8.3 Ktx/sec
sqlite 💿 person multi_index 1000 100 230.4±0.86µs 232.3±0.53µs 4.2 Ktx/sec 4.2 Ktx/sec
sqlite 💿 person non_unique 0 100 50.6±8.13µs 48.6±1.25µs 19.3 Ktx/sec 20.1 Ktx/sec
sqlite 💿 person non_unique 1000 100 61.0±0.62µs 60.0±0.35µs 16.0 Ktx/sec 16.3 Ktx/sec
sqlite 💿 person unique 0 100 50.9±1.15µs 51.6±1.05µs 19.2 Ktx/sec 18.9 Ktx/sec
sqlite 💿 person unique 1000 100 58.0±17.89µs 56.6±0.29µs 16.8 Ktx/sec 17.3 Ktx/sec
sqlite 🧠 location multi_index 0 100 119.2±0.43µs 119.5±0.43µs 8.2 Ktx/sec 8.2 Ktx/sec
sqlite 🧠 location multi_index 1000 100 168.5±0.34µs 168.9±0.55µs 5.8 Ktx/sec 5.8 Ktx/sec
sqlite 🧠 location non_unique 0 100 44.2±0.38µs 44.0±0.57µs 22.1 Ktx/sec 22.2 Ktx/sec
sqlite 🧠 location non_unique 1000 100 44.6±0.27µs 44.2±0.29µs 21.9 Ktx/sec 22.1 Ktx/sec
sqlite 🧠 location unique 0 100 45.4±0.31µs 45.5±0.41µs 21.5 Ktx/sec 21.5 Ktx/sec
sqlite 🧠 location unique 1000 100 48.7±0.53µs 49.2±0.49µs 20.1 Ktx/sec 19.9 Ktx/sec
sqlite 🧠 person multi_index 0 100 106.4±0.46µs 106.6±1.05µs 9.2 Ktx/sec 9.2 Ktx/sec
sqlite 🧠 person multi_index 1000 100 187.7±0.29µs 188.4±0.36µs 5.2 Ktx/sec 5.2 Ktx/sec
sqlite 🧠 person non_unique 0 100 42.9±0.47µs 42.4±0.37µs 22.8 Ktx/sec 23.0 Ktx/sec
sqlite 🧠 person non_unique 1000 100 46.3±0.32µs 46.6±0.28µs 21.1 Ktx/sec 20.9 Ktx/sec
sqlite 🧠 person unique 0 100 44.7±0.53µs 45.5±0.38µs 21.9 Ktx/sec 21.5 Ktx/sec
sqlite 🧠 person unique 1000 100 48.1±0.33µs 49.5±0.62µs 20.3 Ktx/sec 19.7 Ktx/sec
stdb_module 💿 location multi_index 0 100 680.1±113.09µs 620.3±80.75µs 1470 tx/sec 1612 tx/sec
stdb_module 💿 location multi_index 1000 100 823.5±214.37µs 956.7±161.37µs 1214 tx/sec 1045 tx/sec
stdb_module 💿 location non_unique 0 100 548.8±69.69µs 376.4±0.54µs 1822 tx/sec 2.6 Ktx/sec
stdb_module 💿 location non_unique 1000 100 549.4±61.12µs 486.2±75.28µs 1820 tx/sec 2.0 Ktx/sec
stdb_module 💿 location unique 0 100 506.7±51.09µs 683.8±26.40µs 1973 tx/sec 1462 tx/sec
stdb_module 💿 location unique 1000 100 663.8±137.66µs 594.1±50.71µs 1506 tx/sec 1683 tx/sec
stdb_module 💿 person multi_index 0 100 955.9±3.02µs 1101.8±16.73µs 1046 tx/sec 907 tx/sec
stdb_module 💿 person multi_index 1000 100 1061.5±12.48µs 1303.0±18.48µs 942 tx/sec 767 tx/sec
stdb_module 💿 person non_unique 0 100 572.4±152.34µs 759.1±54.47µs 1747 tx/sec 1317 tx/sec
stdb_module 💿 person non_unique 1000 100 570.8±87.08µs 1022.4±42.51µs 1751 tx/sec 978 tx/sec
stdb_module 💿 person unique 0 100 774.6±29.67µs 729.2±28.85µs 1290 tx/sec 1371 tx/sec
stdb_module 💿 person unique 1000 100 974.7±73.81µs 1006.8±90.82µs 1026 tx/sec 993 tx/sec
stdb_module 🧠 location multi_index 0 100 533.6±27.04µs 468.9±22.47µs 1874 tx/sec 2.1 Ktx/sec
stdb_module 🧠 location multi_index 1000 100 589.1±47.44µs 663.5±69.88µs 1697 tx/sec 1507 tx/sec
stdb_module 🧠 location non_unique 0 100 390.1±8.78µs 263.9±0.96µs 2.5 Ktx/sec 3.7 Ktx/sec
stdb_module 🧠 location non_unique 1000 100 469.2±8.32µs 461.6±4.52µs 2.1 Ktx/sec 2.1 Ktx/sec
stdb_module 🧠 location unique 0 100 444.1±66.05µs 594.9±1.20µs 2.2 Ktx/sec 1681 tx/sec
stdb_module 🧠 location unique 1000 100 541.0±67.46µs 586.5±14.95µs 1848 tx/sec 1704 tx/sec
stdb_module 🧠 person multi_index 0 100 811.0±9.26µs 982.6±112.63µs 1233 tx/sec 1017 tx/sec
stdb_module 🧠 person multi_index 1000 100 997.2±27.79µs 1128.9±44.39µs 1002 tx/sec 885 tx/sec
stdb_module 🧠 person non_unique 0 100 312.6±23.52µs 520.2±7.90µs 3.1 Ktx/sec 1922 tx/sec
stdb_module 🧠 person non_unique 1000 100 348.2±1.61µs 684.6±87.99µs 2.8 Ktx/sec 1460 tx/sec
stdb_module 🧠 person unique 0 100 598.2±1.01µs 584.6±24.55µs 1671 tx/sec 1710 tx/sec
stdb_module 🧠 person unique 1000 100 601.0±3.91µs 815.8±2.71µs 1663 tx/sec 1225 tx/sec
stdb_raw 💿 location multi_index 0 100 395.0±0.73µs 395.1±35.07µs 2.5 Ktx/sec 2.5 Ktx/sec
stdb_raw 💿 location multi_index 1000 100 442.7±240.50µs 446.9±303.53µs 2.2 Ktx/sec 2.2 Ktx/sec
stdb_raw 💿 location non_unique 0 100 173.5±30.26µs 171.7±11.72µs 5.6 Ktx/sec 5.7 Ktx/sec
stdb_raw 💿 location non_unique 1000 100 186.3±140.38µs 172.9±1.01µs 5.2 Ktx/sec 5.6 Ktx/sec
stdb_raw 💿 location unique 0 100 293.6±0.37µs 295.3±13.61µs 3.3 Ktx/sec 3.3 Ktx/sec
stdb_raw 💿 location unique 1000 100 332.5±225.02µs 333.3±225.47µs 2.9 Ktx/sec 2.9 Ktx/sec
stdb_raw 💿 person multi_index 0 100 720.9±4.88µs 722.7±1.39µs 1387 tx/sec 1383 tx/sec
stdb_raw 💿 person multi_index 1000 100 786.9±374.48µs 800.5±481.57µs 1270 tx/sec 1249 tx/sec
stdb_raw 💿 person non_unique 0 100 227.7±0.23µs 228.2±0.13µs 4.3 Ktx/sec 4.3 Ktx/sec
stdb_raw 💿 person non_unique 1000 100 247.0±170.79µs 231.1±0.52µs 4.0 Ktx/sec 4.2 Ktx/sec
stdb_raw 💿 person unique 0 100 437.4±0.48µs 439.2±8.11µs 2.2 Ktx/sec 2.2 Ktx/sec
stdb_raw 💿 person unique 1000 100 485.8±310.02µs 478.7±237.17µs 2.0 Ktx/sec 2.0 Ktx/sec
stdb_raw 🧠 location multi_index 0 100 296.6±0.73µs 298.6±0.78µs 3.3 Ktx/sec 3.3 Ktx/sec
stdb_raw 🧠 location multi_index 1000 100 321.1±0.52µs 321.6±0.58µs 3.0 Ktx/sec 3.0 Ktx/sec
stdb_raw 🧠 location non_unique 0 100 74.2±0.30µs 74.4±0.12µs 13.2 Ktx/sec 13.1 Ktx/sec
stdb_raw 🧠 location non_unique 1000 100 76.1±0.13µs 75.6±0.19µs 12.8 Ktx/sec 12.9 Ktx/sec
stdb_raw 🧠 location unique 0 100 195.8±2.12µs 198.1±0.44µs 5.0 Ktx/sec 4.9 Ktx/sec
stdb_raw 🧠 location unique 1000 100 214.8±0.60µs 213.8±0.24µs 4.5 Ktx/sec 4.6 Ktx/sec
stdb_raw 🧠 person multi_index 0 100 617.2±0.90µs 623.7±0.54µs 1620 tx/sec 1603 tx/sec
stdb_raw 🧠 person multi_index 1000 100 647.2±0.63µs 653.4±0.66µs 1545 tx/sec 1530 tx/sec
stdb_raw 🧠 person non_unique 0 100 127.6±0.43µs 127.8±0.51µs 7.7 Ktx/sec 7.6 Ktx/sec
stdb_raw 🧠 person non_unique 1000 100 129.6±0.26µs 129.8±0.27µs 7.5 Ktx/sec 7.5 Ktx/sec
stdb_raw 🧠 person unique 0 100 337.4±2.87µs 336.6±0.34µs 2.9 Ktx/sec 2.9 Ktx/sec
stdb_raw 🧠 person unique 1000 100 356.0±0.96µs 354.3±0.59µs 2.7 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.15µs 8.9±0.11µs 108.7 Ktx/sec 109.8 Ktx/sec
sqlite 💿 person unique 9.4±0.17µs 9.4±0.12µs 104.1 Ktx/sec 104.4 Ktx/sec
sqlite 🧠 location unique 7.9±0.16µs 7.6±0.08µs 124.4 Ktx/sec 128.5 Ktx/sec
sqlite 🧠 person unique 8.3±0.17µs 8.3±0.19µs 118.0 Ktx/sec 117.6 Ktx/sec
stdb_module 💿 location unique 48.5±5.61µs 49.9±3.32µs 20.1 Ktx/sec 19.6 Ktx/sec
stdb_module 💿 person unique 63.3±10.98µs 55.6±10.54µs 15.4 Ktx/sec 17.6 Ktx/sec
stdb_module 🧠 location unique 46.9±7.05µs 49.5±4.55µs 20.8 Ktx/sec 19.7 Ktx/sec
stdb_module 🧠 person unique 64.8±9.36µs 55.5±11.71µs 15.1 Ktx/sec 17.6 Ktx/sec
stdb_raw 💿 location unique 9.1±0.55µs 9.1±0.02µs 107.3 Ktx/sec 107.4 Ktx/sec
stdb_raw 💿 person unique 8.9±0.03µs 9.1±0.03µs 109.2 Ktx/sec 107.4 Ktx/sec
stdb_raw 🧠 location unique 8.9±0.03µs 9.1±0.10µs 109.2 Ktx/sec 107.7 Ktx/sec
stdb_raw 🧠 person unique 9.0±0.03µs 9.1±0.10µs 109.1 Ktx/sec 107.6 Ktx/sec

Find unique key

db on disk key type load new latency old latency new throughput old throughput
sqlite 💿 u32 1000 2.4±0.01µs 2.4±0.01µs 412.0 Ktx/sec 410.5 Ktx/sec
sqlite 🧠 u32 1000 1135.6±5.54ns 1132.1±4.77ns 860.0 Ktx/sec 862.6 Ktx/sec
stdb_module 💿 u32 1000 24.6±1.47µs 25.4±2.26µs 39.8 Ktx/sec 38.4 Ktx/sec
stdb_module 🧠 u32 1000 26.6±2.63µs 23.7±1.50µs 36.7 Ktx/sec 41.2 Ktx/sec
stdb_raw 💿 u32 1000 1908.2±4.79ns 1906.5±3.43ns 511.8 Ktx/sec 512.2 Ktx/sec
stdb_raw 🧠 u32 1000 1909.2±5.69ns 1899.5±3.45ns 511.5 Ktx/sec 514.1 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.03µs 5.7±0.02µs 171.4 Ktx/sec 171.3 Ktx/sec
sqlite 💿 string non_indexed 1000 10 49.4±0.54µs 49.0±0.36µs 19.8 Ktx/sec 19.9 Ktx/sec
sqlite 💿 u64 indexed 1000 10 5.5±0.06µs 5.6±0.01µs 177.2 Ktx/sec 175.9 Ktx/sec
sqlite 💿 u64 non_indexed 1000 10 33.1±0.10µs 32.9±0.07µs 29.5 Ktx/sec 29.7 Ktx/sec
sqlite 🧠 string indexed 1000 10 4.2±0.02µs 4.2±0.02µs 230.1 Ktx/sec 233.3 Ktx/sec
sqlite 🧠 string non_indexed 1000 10 47.5±0.34µs 47.7±0.31µs 20.5 Ktx/sec 20.5 Ktx/sec
sqlite 🧠 u64 indexed 1000 10 4.1±0.02µs 4.1±0.01µs 239.7 Ktx/sec 240.8 Ktx/sec
sqlite 🧠 u64 non_indexed 1000 10 31.7±0.08µs 32.0±0.16µs 30.8 Ktx/sec 30.6 Ktx/sec
stdb_module 💿 string indexed 1000 10 37.8±2.79µs 36.8±2.73µs 25.9 Ktx/sec 26.6 Ktx/sec
stdb_module 💿 string non_indexed 1000 10 169.1±3.94µs 166.2±0.95µs 5.8 Ktx/sec 5.9 Ktx/sec
stdb_module 💿 u64 indexed 1000 10 35.1±1.43µs 32.5±1.98µs 27.8 Ktx/sec 30.1 Ktx/sec
stdb_module 💿 u64 non_indexed 1000 10 146.8±7.01µs 139.2±1.96µs 6.7 Ktx/sec 7.0 Ktx/sec
stdb_module 🧠 string indexed 1000 10 36.9±2.24µs 36.2±2.92µs 26.4 Ktx/sec 27.0 Ktx/sec
stdb_module 🧠 string non_indexed 1000 10 160.7±0.94µs 169.8±6.13µs 6.1 Ktx/sec 5.8 Ktx/sec
stdb_module 🧠 u64 indexed 1000 10 33.5±2.20µs 33.4±2.42µs 29.2 Ktx/sec 29.3 Ktx/sec
stdb_module 🧠 u64 non_indexed 1000 10 137.8±1.76µs 138.4±7.02µs 7.1 Ktx/sec 7.1 Ktx/sec
stdb_raw 💿 string indexed 1000 10 4.4±0.01µs 4.5±0.01µs 219.9 Ktx/sec 218.8 Ktx/sec
stdb_raw 💿 string non_indexed 1000 10 134.6±0.18µs 133.0±0.22µs 7.3 Ktx/sec 7.3 Ktx/sec
stdb_raw 💿 u64 indexed 1000 10 4.3±0.01µs 4.4±0.01µs 225.1 Ktx/sec 224.1 Ktx/sec
stdb_raw 💿 u64 non_indexed 1000 10 113.5±0.14µs 114.1±0.34µs 8.6 Ktx/sec 8.6 Ktx/sec
stdb_raw 🧠 string indexed 1000 10 4.4±0.01µs 4.4±0.01µs 219.9 Ktx/sec 219.5 Ktx/sec
stdb_raw 🧠 string non_indexed 1000 10 130.3±0.21µs 130.0±0.38µs 7.5 Ktx/sec 7.5 Ktx/sec
stdb_raw 🧠 u64 indexed 1000 10 4.3±0.01µs 4.3±0.01µs 225.1 Ktx/sec 225.3 Ktx/sec
stdb_raw 🧠 u64 non_indexed 1000 10 112.9±0.21µs 112.4±0.15µs 8.7 Ktx/sec 8.7 Ktx/sec

Serialize

schema format count new latency old latency new throughput old throughput
location bsatn 100 1685.2±31.63ns 1682.9±32.80ns 56.6 Mtx/sec 56.7 Mtx/sec
location json 100 3.3±0.03µs 3.3±0.05µs 28.5 Mtx/sec 29.0 Mtx/sec
location product_value 100 580.3±0.77ns 580.9±1.78ns 164.3 Mtx/sec 164.2 Mtx/sec
person bsatn 100 2.9±0.01µs 2.9±0.01µs 32.9 Mtx/sec 32.9 Mtx/sec
person json 100 5.1±0.05µs 5.2±0.01µs 18.6 Mtx/sec 18.5 Mtx/sec
person product_value 100 1035.5±1.07ns 1029.7±1.43ns 92.1 Mtx/sec 92.6 Mtx/sec

Module: invoke with large arguments

arg size new latency old latency new throughput old throughput
64KiB 81.5±4.20µs 84.4±4.89µs - -

Module: print bulk

line count new latency old latency new throughput old throughput
1 22.7±1.11µs 23.3±1.21µs - -
100 198.0±1.22µs 198.1±1.18µs - -
1000 1808.5±16.66µs 1865.9±141.19µs - -

Remaining benchmarks

name new latency old latency new throughput old throughput

Please sign in to comment.