Export the random generation code as a virtual table in sqlite3#14
Open
NobodyXu wants to merge 2 commits intoavinassh:masterfrom
Open
Export the random generation code as a virtual table in sqlite3#14NobodyXu wants to merge 2 commits intoavinassh:masterfrom
NobodyXu wants to merge 2 commits intoavinassh:masterfrom
Conversation
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Author
|
Here's (part of) the benchmark result on my i7-8750H: |
Author
|
I've requested a PR rusqlite/rusqlite#999 to rusqlite to enable LTO support when using clang-like compiler and using feature "bundled" in |
Owner
|
Hey! Thanks for the PR. I ran the code, I don't see much difference 🤔 Mon Jul 26 19:41:26 IST 2021 [RUST] threaded_batched.rs (100_000_000) inserts
real 0m34.875s
user 0m46.887s
sys 0m4.503s
Mon Jul 26 19:42:03 IST 2021 [RUST] vtable.rs (100_000_000) inserts
real 0m34.244s
user 0m29.748s
sys 0m2.527sI added SQLite optimisations, ran again. It did not make much difference either: |
Author
|
While it’s true that the “real” execution time of vtable isn’t faster, it takes less sys time and also uses only one thread, which mean it uses less resource to accomplish the same task. On the up side, I am preparing a PR for statically linking sqlite3 with LTO enabled, after that PR, vtable might run faster. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jiahao XU Jiahao_XU@outlook.com