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

Add and improve sqlite describe performance benchmarks #2467

Merged
merged 7 commits into from
May 8, 2023

Conversation

tyrelr
Copy link
Contributor

@tyrelr tyrelr commented Apr 24, 2023

Add a few simple benchmarks for sqlite describe performance, then improve the benchmarks by replacing HashMap with a custom IntMap struct (a thin wrapper around Vec giving an API similar to HashMap<i32,_>).

insert/fks
----------
434836b4     1.00      21.2±0.05ms       ? ?/sec (IntMap)
0797aa13     1.30      27.6±0.09ms       ? ?/sec (BranchList)
0f18d2c0     1.54      32.5±0.12ms       ? ?/sec (separateMemory)
9c0fc8bf     1.54      32.6±0.10ms       ? ?/sec (initial)

insert/returning
----------------
434836b4     1.00     430.3±3.55µs       ? ?/sec (IntMap)
9c0fc8bf     1.08     464.6±4.59µs       ? ?/sec (initial)
0f18d2c0     1.09     468.1±4.92µs       ? ?/sec (separateMemory)
0797aa13     1.12     482.5±3.89µs       ? ?/sec (BranchList)

select/recursive
----------------
434836b4     1.00       7.8±0.02ms       ? ?/sec (IntMap)
9c0fc8bf     1.29      10.1±0.03ms       ? ?/sec (initial)
0f18d2c0     1.29      10.1±0.02ms       ? ?/sec (separateMemory)
0797aa13     1.50      11.8±0.03ms       ? ?/sec (BranchList)

select/trivial
--------------
434836b4     1.00     220.5±8.15µs       ? ?/sec (IntMap)
0f18d2c0     1.05     231.3±9.63µs       ? ?/sec (separateMemory)
9c0fc8bf     1.05     232.0±8.79µs       ? ?/sec (initial)
0797aa13     1.06     233.3±8.66µs       ? ?/sec (BranchList)

@tyrelr tyrelr changed the title Sqlite describe performance Add and improve sqlite describe performance benchmarks Apr 24, 2023
@abonander
Copy link
Collaborator

Looks like merging your other PR introduced some conflicts.

@tyrelr tyrelr force-pushed the sqlite-describe-performance branch from 9110658 to 73728e0 Compare May 7, 2023 05:09
@tyrelr tyrelr force-pushed the sqlite-describe-performance branch from 73728e0 to 4e59c96 Compare May 7, 2023 05:51
@abonander abonander merged commit 0dfebb2 into launchbadge:main May 8, 2023
@tyrelr tyrelr deleted the sqlite-describe-performance branch May 19, 2023 17:26
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