Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTreeIndex: Specialize on primitive key types for great performance #793

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

gefjon
Copy link
Contributor

@gefjon gefjon commented Feb 5, 2024

Description of Changes

Rewrite of Tyler's #771, because I thought this would be easier than rebasing.

This commit hoists branching on key types outside of comparisons and searches in BTreeIndex, so that in many cases we can use e.g. u64::cmp instead of the much slower AlgebraicValue::cmp.

This design is kind of ugly, and will likely change in the future, but for now it's good enough, and is a meaningful performance improvement.

API and ABI breaking changes

No external interfaces change.

Expected complexity level and risk

2 - ugly code with lots of repetitive matching may open us up to copy/paste errors.

Rewrite of Tyler's #771, because I thought this would be easier than rebasing.

This commit hoists branching on key types outside of comparisons and searches
in `BTreeIndex`,
so that in many cases we can use e.g. `u64::cmp`
instead of the much slower `AlgebraicValue::cmp`.

This design is kind of ugly, and will likely change in the future,
but for now it's good enough, and is a meaningful performance improvement.
Copy link
Contributor

@kazimuth kazimuth left a comment

Choose a reason for hiding this comment

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

👍

@gefjon gefjon added this pull request to the merge queue Feb 6, 2024
Merged via the queue into master with commit b8cecb3 Feb 6, 2024
5 checks passed
@gefjon
Copy link
Contributor Author

gefjon commented Feb 6, 2024

benchmarks please

Copy link

github-actions bot commented Feb 6, 2024

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 💿 - 435.8±1.81ns - -
sqlite 🧠 - 425.0±1.86ns - -
stdb_module 💿 34.5±2.97µs 35.0±2.85µs - -
stdb_module 🧠 35.0±2.46µs 35.6±2.19µs - -
stdb_raw 💿 943.9±1.42ns 929.2±1.41ns - -
stdb_raw 🧠 877.0±1.40ns 884.9±0.89ns - -

Single-row insertions

db on disk schema index type load new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 - 14.7±0.06µs - 66.3 Ktx/sec
sqlite 💿 location multi_index 1000 - 15.7±0.12µs - 62.1 Ktx/sec
sqlite 💿 location non_unique 0 - 7.1±0.02µs - 138.0 Ktx/sec
sqlite 💿 location non_unique 1000 - 7.0±0.03µs - 140.2 Ktx/sec
sqlite 💿 location unique 0 - 7.0±0.04µs - 138.6 Ktx/sec
sqlite 💿 location unique 1000 - 7.0±0.03µs - 139.4 Ktx/sec
sqlite 💿 person multi_index 0 - 14.3±0.14µs - 68.4 Ktx/sec
sqlite 💿 person multi_index 1000 - 16.0±0.13µs - 61.2 Ktx/sec
sqlite 💿 person non_unique 0 - 7.3±0.56µs - 134.4 Ktx/sec
sqlite 💿 person non_unique 1000 - 7.1±0.04µs - 137.3 Ktx/sec
sqlite 💿 person unique 0 - 7.2±0.62µs - 135.0 Ktx/sec
sqlite 💿 person unique 1000 - 7.2±0.07µs - 135.3 Ktx/sec
sqlite 🧠 location multi_index 0 - 4.0±0.01µs - 242.1 Ktx/sec
sqlite 🧠 location multi_index 1000 - 5.2±0.17µs - 186.6 Ktx/sec
sqlite 🧠 location non_unique 0 - 1815.3±8.70ns - 538.0 Ktx/sec
sqlite 🧠 location non_unique 1000 - 1870.6±20.28ns - 522.1 Ktx/sec
sqlite 🧠 location unique 0 - 1804.2±4.56ns - 541.3 Ktx/sec
sqlite 🧠 location unique 1000 - 1917.9±7.87ns - 509.2 Ktx/sec
sqlite 🧠 person multi_index 0 - 3.6±0.01µs - 268.3 Ktx/sec
sqlite 🧠 person multi_index 1000 - 5.5±0.03µs - 178.3 Ktx/sec
sqlite 🧠 person non_unique 0 - 1908.4±3.83ns - 511.7 Ktx/sec
sqlite 🧠 person non_unique 1000 - 1966.7±9.75ns - 496.5 Ktx/sec
sqlite 🧠 person unique 0 - 1863.6±4.32ns - 524.0 Ktx/sec
sqlite 🧠 person unique 1000 - 2.0±0.02µs - 488.2 Ktx/sec
stdb_module 💿 location multi_index 0 70.4±4.06µs 70.4±5.02µs 13.9 Ktx/sec 13.9 Ktx/sec
stdb_module 💿 location multi_index 1000 117.5±11.23µs 181.3±2.61µs 8.3 Ktx/sec 5.4 Ktx/sec
stdb_module 💿 location non_unique 0 62.1±8.19µs 65.9±6.76µs 15.7 Ktx/sec 14.8 Ktx/sec
stdb_module 💿 location non_unique 1000 189.1±2.65µs 202.4±9.87µs 5.2 Ktx/sec 4.8 Ktx/sec
stdb_module 💿 location unique 0 68.9±3.97µs 69.3±3.81µs 14.2 Ktx/sec 14.1 Ktx/sec
stdb_module 💿 location unique 1000 183.8±7.82µs 199.3±3.89µs 5.3 Ktx/sec 4.9 Ktx/sec
stdb_module 💿 person multi_index 0 80.9±4.64µs 80.3±13.95µs 12.1 Ktx/sec 12.2 Ktx/sec
stdb_module 💿 person multi_index 1000 134.9±7.55µs 257.1±4.60µs 7.2 Ktx/sec 3.8 Ktx/sec
stdb_module 💿 person non_unique 0 74.3±4.46µs 76.4±3.31µs 13.1 Ktx/sec 12.8 Ktx/sec
stdb_module 💿 person non_unique 1000 233.7±8.46µs 166.8±3.34µs 4.2 Ktx/sec 5.9 Ktx/sec
stdb_module 💿 person unique 0 78.1±3.63µs 77.9±5.10µs 12.5 Ktx/sec 12.5 Ktx/sec
stdb_module 💿 person unique 1000 186.4±2.74µs 115.5±5.40µs 5.2 Ktx/sec 8.5 Ktx/sec
stdb_module 🧠 location multi_index 0 53.1±6.72µs 58.1±5.19µs 18.4 Ktx/sec 16.8 Ktx/sec
stdb_module 🧠 location multi_index 1000 118.1±5.49µs 93.0±8.26µs 8.3 Ktx/sec 10.5 Ktx/sec
stdb_module 🧠 location non_unique 0 58.2±4.04µs 55.2±5.36µs 16.8 Ktx/sec 17.7 Ktx/sec
stdb_module 🧠 location non_unique 1000 140.7±8.37µs 139.7±3.05µs 6.9 Ktx/sec 7.0 Ktx/sec
stdb_module 🧠 location unique 0 58.4±5.03µs 56.1±6.09µs 16.7 Ktx/sec 17.4 Ktx/sec
stdb_module 🧠 location unique 1000 118.3±1.23µs 137.4±10.51µs 8.3 Ktx/sec 7.1 Ktx/sec
stdb_module 🧠 person multi_index 0 64.7±3.76µs 66.4±3.41µs 15.1 Ktx/sec 14.7 Ktx/sec
stdb_module 🧠 person multi_index 1000 149.2±1.20µs 183.3±2.48µs 6.5 Ktx/sec 5.3 Ktx/sec
stdb_module 🧠 person non_unique 0 59.3±3.57µs 56.7±7.87µs 16.5 Ktx/sec 17.2 Ktx/sec
stdb_module 🧠 person non_unique 1000 102.8±3.87µs 105.2±6.46µs 9.5 Ktx/sec 9.3 Ktx/sec
stdb_module 🧠 person unique 0 61.6±6.29µs 61.9±4.37µs 15.9 Ktx/sec 15.8 Ktx/sec
stdb_module 🧠 person unique 1000 149.8±6.02µs 125.6±27.50µs 6.5 Ktx/sec 7.8 Ktx/sec
stdb_raw 💿 location multi_index 0 5.9±0.03µs 5.9±0.03µs 164.3 Ktx/sec 165.4 Ktx/sec
stdb_raw 💿 location multi_index 1000 23.0±141.95µs 8.7±0.15µs 42.5 Ktx/sec 112.0 Ktx/sec
stdb_raw 💿 location non_unique 0 5.4±0.02µs 5.3±0.02µs 181.6 Ktx/sec 183.7 Ktx/sec
stdb_raw 💿 location non_unique 1000 17.3±99.34µs 17.2±99.76µs 56.6 Ktx/sec 56.8 Ktx/sec
stdb_raw 💿 location unique 0 5.9±0.02µs 5.8±0.01µs 166.0 Ktx/sec 168.6 Ktx/sec
stdb_raw 💿 location unique 1000 8.4±0.17µs 20.1±117.09µs 115.6 Ktx/sec 48.6 Ktx/sec
stdb_raw 💿 person multi_index 0 7.5±0.11µs 7.3±0.01µs 130.7 Ktx/sec 133.9 Ktx/sec
stdb_raw 💿 person multi_index 1000 26.8±159.24µs 10.6±0.12µs 36.4 Ktx/sec 91.7 Ktx/sec
stdb_raw 💿 person non_unique 0 6.7±0.01µs 6.5±0.01µs 146.1 Ktx/sec 149.5 Ktx/sec
stdb_raw 💿 person non_unique 1000 21.5±126.17µs 8.8±0.11µs 45.4 Ktx/sec 111.2 Ktx/sec
stdb_raw 💿 person unique 0 7.2±0.03µs 7.0±0.02µs 135.7 Ktx/sec 138.7 Ktx/sec
stdb_raw 💿 person unique 1000 10.1±0.13µs 10.0±0.19µs 96.5 Ktx/sec 97.7 Ktx/sec
stdb_raw 🧠 location multi_index 0 3.4±0.02µs 3.4±0.02µs 289.8 Ktx/sec 290.2 Ktx/sec
stdb_raw 🧠 location multi_index 1000 4.9±0.06µs 4.9±0.04µs 201.1 Ktx/sec 197.3 Ktx/sec
stdb_raw 🧠 location non_unique 0 2.8±0.01µs 2.8±0.01µs 351.9 Ktx/sec 346.6 Ktx/sec
stdb_raw 🧠 location non_unique 1000 3.5±0.03µs 3.5±0.02µs 278.7 Ktx/sec 279.7 Ktx/sec
stdb_raw 🧠 location unique 0 3.2±0.02µs 3.2±0.01µs 304.5 Ktx/sec 302.0 Ktx/sec
stdb_raw 🧠 location unique 1000 4.5±0.03µs 4.5±0.06µs 219.0 Ktx/sec 214.7 Ktx/sec
stdb_raw 🧠 person multi_index 0 4.2±0.01µs 4.1±0.01µs 235.2 Ktx/sec 239.0 Ktx/sec
stdb_raw 🧠 person multi_index 1000 6.3±0.05µs 6.3±0.04µs 154.3 Ktx/sec 155.3 Ktx/sec
stdb_raw 🧠 person non_unique 0 3.5±0.03µs 3.5±0.02µs 278.4 Ktx/sec 282.0 Ktx/sec
stdb_raw 🧠 person non_unique 1000 4.4±0.03µs 4.5±0.03µs 219.9 Ktx/sec 218.8 Ktx/sec
stdb_raw 🧠 person unique 0 3.9±0.01µs 3.9±0.02µs 250.1 Ktx/sec 252.0 Ktx/sec
stdb_raw 🧠 person unique 1000 5.4±0.03µs 5.5±0.04µs 179.3 Ktx/sec 179.0 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 - 131.2±3.35µs - 7.4 Ktx/sec
sqlite 💿 location multi_index 1000 100 - 201.3±1.38µs - 4.9 Ktx/sec
sqlite 💿 location non_unique 0 100 - 50.4±4.28µs - 19.4 Ktx/sec
sqlite 💿 location non_unique 1000 100 - 52.1±0.29µs - 18.8 Ktx/sec
sqlite 💿 location unique 0 100 - 51.9±4.76µs - 18.8 Ktx/sec
sqlite 💿 location unique 1000 100 - 54.6±0.32µs - 17.9 Ktx/sec
sqlite 💿 person multi_index 0 100 - 117.0±9.98µs - 8.3 Ktx/sec
sqlite 💿 person multi_index 1000 100 - 226.1±0.49µs - 4.3 Ktx/sec
sqlite 💿 person non_unique 0 100 - 46.8±3.83µs - 20.9 Ktx/sec
sqlite 💿 person non_unique 1000 100 - 58.1±0.33µs - 16.8 Ktx/sec
sqlite 💿 person unique 0 100 - 48.6±2.92µs - 20.1 Ktx/sec
sqlite 💿 person unique 1000 100 - 53.1±0.45µs - 18.4 Ktx/sec
sqlite 🧠 location multi_index 0 100 - 118.4±0.45µs - 8.2 Ktx/sec
sqlite 🧠 location multi_index 1000 100 - 168.6±0.44µs - 5.8 Ktx/sec
sqlite 🧠 location non_unique 0 100 - 42.7±0.53µs - 22.9 Ktx/sec
sqlite 🧠 location non_unique 1000 100 - 44.8±0.42µs - 21.8 Ktx/sec
sqlite 🧠 location unique 0 100 - 43.7±0.49µs - 22.3 Ktx/sec
sqlite 🧠 location unique 1000 100 - 48.0±0.34µs - 20.4 Ktx/sec
sqlite 🧠 person multi_index 0 100 - 104.9±0.71µs - 9.3 Ktx/sec
sqlite 🧠 person multi_index 1000 100 - 188.3±0.63µs - 5.2 Ktx/sec
sqlite 🧠 person non_unique 0 100 - 40.4±0.51µs - 24.2 Ktx/sec
sqlite 🧠 person non_unique 1000 100 - 44.6±0.28µs - 21.9 Ktx/sec
sqlite 🧠 person unique 0 100 - 41.6±0.55µs - 23.5 Ktx/sec
sqlite 🧠 person unique 1000 100 - 47.0±0.40µs - 20.8 Ktx/sec
stdb_module 💿 location multi_index 0 100 527.4±66.08µs 587.3±8.81µs 1896 tx/sec 1702 tx/sec
stdb_module 💿 location multi_index 1000 100 586.6±43.36µs 643.1±5.67µs 1704 tx/sec 1554 tx/sec
stdb_module 💿 location non_unique 0 100 517.9±17.39µs 495.4±13.66µs 1930 tx/sec 2018 tx/sec
stdb_module 💿 location non_unique 1000 100 569.2±8.91µs 528.3±13.05µs 1756 tx/sec 1892 tx/sec
stdb_module 💿 location unique 0 100 487.2±30.22µs 570.1±8.35µs 2.0 Ktx/sec 1754 tx/sec
stdb_module 💿 location unique 1000 100 525.0±30.23µs 647.4±7.36µs 1904 tx/sec 1544 tx/sec
stdb_module 💿 person multi_index 0 100 809.0±31.06µs 850.1±317.09µs 1236 tx/sec 1176 tx/sec
stdb_module 💿 person multi_index 1000 100 861.2±24.75µs 900.2±64.25µs 1161 tx/sec 1110 tx/sec
stdb_module 💿 person non_unique 0 100 684.1±12.85µs 742.5±51.91µs 1461 tx/sec 1346 tx/sec
stdb_module 💿 person non_unique 1000 100 715.1±3.94µs 812.5±23.59µs 1398 tx/sec 1230 tx/sec
stdb_module 💿 person unique 0 100 775.1±31.99µs 838.2±2.06µs 1290 tx/sec 1192 tx/sec
stdb_module 💿 person unique 1000 100 1016.1±2082.93µs 989.7±5.24µs 984 tx/sec 1010 tx/sec
stdb_module 🧠 location multi_index 0 100 454.3±0.99µs 387.2±51.64µs 2.1 Ktx/sec 2.5 Ktx/sec
stdb_module 🧠 location multi_index 1000 100 416.1±3.54µs 337.5±54.38µs 2.3 Ktx/sec 2.9 Ktx/sec
stdb_module 🧠 location non_unique 0 100 378.0±2.46µs 353.6±31.44µs 2.6 Ktx/sec 2.8 Ktx/sec
stdb_module 🧠 location non_unique 1000 100 406.6±1.44µs 371.4±43.04µs 2.4 Ktx/sec 2.6 Ktx/sec
stdb_module 🧠 location unique 0 100 436.4±9.03µs 386.0±31.54µs 2.2 Ktx/sec 2.5 Ktx/sec
stdb_module 🧠 location unique 1000 100 397.0±2.45µs 428.4±51.46µs 2.5 Ktx/sec 2.3 Ktx/sec
stdb_module 🧠 person multi_index 0 100 634.5±6.49µs 667.4±14.51µs 1576 tx/sec 1498 tx/sec
stdb_module 🧠 person multi_index 1000 100 686.8±7.56µs 796.1±12.16µs 1456 tx/sec 1256 tx/sec
stdb_module 🧠 person non_unique 0 100 497.7±1.57µs 478.8±33.21µs 2009 tx/sec 2.0 Ktx/sec
stdb_module 🧠 person non_unique 1000 100 491.3±5.01µs 575.8±76.28µs 2035 tx/sec 1736 tx/sec
stdb_module 🧠 person unique 0 100 550.8±20.46µs 530.6±50.28µs 1815 tx/sec 1884 tx/sec
stdb_module 🧠 person unique 1000 100 569.6±1.84µs 692.4±4.91µs 1755 tx/sec 1444 tx/sec
stdb_raw 💿 location multi_index 0 100 162.6±0.24µs 163.0±0.27µs 6.0 Ktx/sec 6.0 Ktx/sec
stdb_raw 💿 location multi_index 1000 100 191.5±146.16µs 177.2±1.10µs 5.1 Ktx/sec 5.5 Ktx/sec
stdb_raw 💿 location non_unique 0 100 125.4±0.24µs 125.9±4.47µs 7.8 Ktx/sec 7.8 Ktx/sec
stdb_raw 💿 location non_unique 1000 100 127.4±0.96µs 127.6±0.95µs 7.7 Ktx/sec 7.7 Ktx/sec
stdb_raw 💿 location unique 0 100 159.8±0.16µs 159.3±0.30µs 6.1 Ktx/sec 6.1 Ktx/sec
stdb_raw 💿 location unique 1000 100 166.1±1.04µs 166.3±1.06µs 5.9 Ktx/sec 5.9 Ktx/sec
stdb_raw 💿 person multi_index 0 100 276.1±9.41µs 277.3±0.25µs 3.5 Ktx/sec 3.5 Ktx/sec
stdb_raw 💿 person multi_index 1000 100 287.6±3.44µs 311.7±222.37µs 3.4 Ktx/sec 3.1 Ktx/sec
stdb_raw 💿 person non_unique 0 100 216.8±0.19µs 217.9±0.25µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_raw 💿 person non_unique 1000 100 232.1±135.26µs 235.8±168.02µs 4.2 Ktx/sec 4.1 Ktx/sec
stdb_raw 💿 person unique 0 100 252.4±0.37µs 253.4±9.61µs 3.9 Ktx/sec 3.9 Ktx/sec
stdb_raw 💿 person unique 1000 100 261.2±6.50µs 281.0±208.66µs 3.7 Ktx/sec 3.5 Ktx/sec
stdb_raw 🧠 location multi_index 0 100 115.1±1.11µs 115.9±0.16µs 8.5 Ktx/sec 8.4 Ktx/sec
stdb_raw 🧠 location multi_index 1000 100 128.9±0.19µs 129.8±0.19µs 7.6 Ktx/sec 7.5 Ktx/sec
stdb_raw 🧠 location non_unique 0 100 78.8±0.09µs 78.8±0.08µs 12.4 Ktx/sec 12.4 Ktx/sec
stdb_raw 🧠 location non_unique 1000 100 80.0±0.13µs 80.6±0.20µs 12.2 Ktx/sec 12.1 Ktx/sec
stdb_raw 🧠 location unique 0 100 113.5±0.17µs 113.3±0.24µs 8.6 Ktx/sec 8.6 Ktx/sec
stdb_raw 🧠 location unique 1000 100 119.8±0.38µs 119.9±0.41µs 8.2 Ktx/sec 8.1 Ktx/sec
stdb_raw 🧠 person multi_index 0 100 178.4±0.24µs 181.8±0.13µs 5.5 Ktx/sec 5.4 Ktx/sec
stdb_raw 🧠 person multi_index 1000 100 190.4±0.27µs 193.4±0.31µs 5.1 Ktx/sec 5.0 Ktx/sec
stdb_raw 🧠 person non_unique 0 100 122.1±0.20µs 123.1±0.20µs 8.0 Ktx/sec 7.9 Ktx/sec
stdb_raw 🧠 person non_unique 1000 100 123.2±0.15µs 123.6±0.14µs 7.9 Ktx/sec 7.9 Ktx/sec
stdb_raw 🧠 person unique 0 100 158.5±0.29µs 158.6±0.20µs 6.2 Ktx/sec 6.2 Ktx/sec
stdb_raw 🧠 person unique 1000 100 165.5±0.29µs 165.6±0.26µs 5.9 Ktx/sec 5.9 Ktx/sec

Full table iterate

db on disk schema index type new latency old latency new throughput old throughput
sqlite 💿 location unique - 9.2±0.11µs - 105.8 Ktx/sec
sqlite 💿 person unique - 9.6±0.07µs - 101.5 Ktx/sec
sqlite 🧠 location unique - 8.1±0.09µs - 119.9 Ktx/sec
sqlite 🧠 person unique - 8.4±0.08µs - 115.8 Ktx/sec
stdb_module 💿 location unique 59.1±6.48µs 66.7±6.31µs 16.5 Ktx/sec 14.6 Ktx/sec
stdb_module 💿 person unique 75.1±3.34µs 76.4±4.04µs 13.0 Ktx/sec 12.8 Ktx/sec
stdb_module 🧠 location unique 63.2±3.89µs 66.9±5.95µs 15.5 Ktx/sec 14.6 Ktx/sec
stdb_module 🧠 person unique 75.7±5.88µs 77.3±5.05µs 12.9 Ktx/sec 12.6 Ktx/sec
stdb_raw 💿 location unique 12.8±0.03µs 12.7±0.05µs 76.3 Ktx/sec 77.1 Ktx/sec
stdb_raw 💿 person unique 14.0±0.01µs 13.8±0.07µs 70.0 Ktx/sec 70.7 Ktx/sec
stdb_raw 🧠 location unique 12.7±0.04µs 12.7±0.02µs 76.8 Ktx/sec 77.1 Ktx/sec
stdb_raw 🧠 person unique 13.9±0.06µs 13.8±0.03µs 70.5 Ktx/sec 70.7 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 - 423.5 Ktx/sec
sqlite 🧠 u32 1000 - 1101.3±3.47ns - 886.7 Ktx/sec
stdb_module 💿 u32 1000 40.2±3.12µs 41.0±3.53µs 24.3 Ktx/sec 23.8 Ktx/sec
stdb_module 🧠 u32 1000 44.5±3.00µs 38.2±1.51µs 22.0 Ktx/sec 25.5 Ktx/sec
stdb_raw 💿 u32 1000 1846.0±3.59ns 1838.5±3.95ns 529.0 Ktx/sec 531.2 Ktx/sec
stdb_raw 🧠 u32 1000 1746.3±2.77ns 1744.7±3.22ns 559.2 Ktx/sec 559.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.7±0.03µs - 172.2 Ktx/sec
sqlite 💿 string non_indexed 1000 10 - 50.5±0.19µs - 19.3 Ktx/sec
sqlite 💿 u64 indexed 1000 10 - 5.5±0.04µs - 176.9 Ktx/sec
sqlite 💿 u64 non_indexed 1000 10 - 32.9±0.05µs - 29.7 Ktx/sec
sqlite 🧠 string indexed 1000 10 - 4.3±0.02µs - 229.4 Ktx/sec
sqlite 🧠 string non_indexed 1000 10 - 48.9±0.36µs - 20.0 Ktx/sec
sqlite 🧠 u64 indexed 1000 10 - 4.1±0.01µs - 238.2 Ktx/sec
sqlite 🧠 u64 non_indexed 1000 10 - 31.7±0.06µs - 30.8 Ktx/sec
stdb_module 💿 string indexed 1000 10 47.7±6.06µs 52.0±3.69µs 20.5 Ktx/sec 18.8 Ktx/sec
stdb_module 💿 string non_indexed 1000 10 234.1±1.98µs 233.7±1.55µs 4.2 Ktx/sec 4.2 Ktx/sec
stdb_module 💿 u64 indexed 1000 10 46.5±3.75µs 46.9±3.70µs 21.0 Ktx/sec 20.8 Ktx/sec
stdb_module 💿 u64 non_indexed 1000 10 205.3±0.60µs 209.3±9.27µs 4.8 Ktx/sec 4.7 Ktx/sec
stdb_module 🧠 string indexed 1000 10 49.5±4.83µs 46.0±2.48µs 19.7 Ktx/sec 21.2 Ktx/sec
stdb_module 🧠 string non_indexed 1000 10 232.4±1.15µs 251.7±49.18µs 4.2 Ktx/sec 3.9 Ktx/sec
stdb_module 🧠 u64 indexed 1000 10 48.5±2.09µs 46.9±3.81µs 20.1 Ktx/sec 20.8 Ktx/sec
stdb_module 🧠 u64 non_indexed 1000 10 207.1±5.90µs 204.6±0.72µs 4.7 Ktx/sec 4.8 Ktx/sec
stdb_raw 💿 string indexed 1000 10 2.6±0.00µs 2.6±0.00µs 372.1 Ktx/sec 371.9 Ktx/sec
stdb_raw 💿 string non_indexed 1000 10 184.3±0.88µs 190.4±0.28µs 5.3 Ktx/sec 5.1 Ktx/sec
stdb_raw 💿 u64 indexed 1000 10 2.6±0.00µs 2.6±0.02µs 381.2 Ktx/sec 382.7 Ktx/sec
stdb_raw 💿 u64 non_indexed 1000 10 170.9±0.21µs 164.5±0.31µs 5.7 Ktx/sec 5.9 Ktx/sec
stdb_raw 🧠 string indexed 1000 10 2.5±0.00µs 2.5±0.00µs 388.0 Ktx/sec 384.3 Ktx/sec
stdb_raw 🧠 string non_indexed 1000 10 183.6±0.61µs 190.9±0.56µs 5.3 Ktx/sec 5.1 Ktx/sec
stdb_raw 🧠 u64 indexed 1000 10 2.5±0.00µs 2.5±0.00µs 395.2 Ktx/sec 397.0 Ktx/sec
stdb_raw 🧠 u64 non_indexed 1000 10 170.7±0.19µs 164.3±0.20µs 5.7 Ktx/sec 5.9 Ktx/sec

Serialize

schema format count new latency old latency new throughput old throughput
location bsatn 100 1929.6±32.18ns 1889.7±23.80ns 49.4 Mtx/sec 50.5 Mtx/sec
location json 100 3.4±0.09µs 3.4±0.03µs 28.4 Mtx/sec 28.1 Mtx/sec
location product_value 100 558.4±0.22ns 560.3±0.38ns 170.8 Mtx/sec 170.2 Mtx/sec
person bsatn 100 2.7±0.01µs 2.7±0.01µs 35.7 Mtx/sec 35.6 Mtx/sec
person json 100 5.0±0.07µs 5.1±0.02µs 19.0 Mtx/sec 18.8 Mtx/sec
person product_value 100 632.9±7.80ns 629.6±1.11ns 150.7 Mtx/sec 151.5 Mtx/sec

Module: invoke with large arguments

arg size new latency old latency new throughput old throughput
64KiB 70.5±12.56µs 81.4±6.74µs - -

Module: print bulk

line count new latency old latency new throughput old throughput
1 42.9±3.77µs 43.7±3.54µs - -
100 219.2±1.54µs 223.8±52.17µs - -
1000 1858.2±10.28µs 1878.1±13.77µs - -

Remaining benchmarks

name new latency old latency new throughput old throughput

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants