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

[sorter] Hold records in Vec instead of a BTreeMap #362

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

arpit-saxena
Copy link
Contributor

@arpit-saxena arpit-saxena commented Oct 9, 2024

We now just insert them one after the other in the vector. When rewind is called, the vector is sorted. Iterating is just taking elements from the vector.

Related to #191

SQLite3:

$ time sqlite3 testing/testing.db "SELECT id FROM users ORDER BY zipcode" > /dev/null

real    0m0.020s
user    0m0.013s
sys     0m0.008s

Limbo without this PR:

$ time target/release/limbo testing/testing.db "SELECT id FROM users ORDER BY zipcode" > /dev/null

real    0m0.285s
user    0m0.257s
sys     0m0.014s

Limbo with this PR:

$ time target/release/limbo testing/testing.db "SELECT id FROM users ORDER BY zipcode" > /dev/null

real    0m0.084s
user    0m0.043s
sys     0m0.032s

We now just insert them one after the other in the vector. When rewind
is called, the vector is sorted. Iterating is just taking elements from
the vector
@penberg penberg closed this in d6829e9 Oct 9, 2024
@penberg penberg merged commit d6829e9 into penberg:main Oct 9, 2024
29 of 30 checks passed
@arpit-saxena arpit-saxena deleted the sorter_use_vec branch October 9, 2024 17:25
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