-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make `Page` always fully init Per discussion on the snapshotting proposal, this PR changes the type of `Page.row_data` to `[u8; _]`, where previously it was `[MaybeUninit<u8>; _]`. This turns out to be shockingly easy, as our serialization codepaths never write padding bytes into a page. The only place pages ever became `poison` was the initial allocation; changing this to `alloc_zeroed` causes the `row_data` to always be valid at `[u8; _]`. The majority of this diff is replacing `MaybeUninit`-specific operators with their initialized equivalents, and updating comments and documentation to reflect the new requirements. This change also revealed a bug in the benchmarks introduced when we swapped the order of sum tags and payloads ( #1063 ), where benchmarks used a hardcoded offset for the tag which had not been updated. * Update blake3 Blake3 only supports running under Miri as of 1.15.1, the latest version. Prior versions hard-depended on SIMD intrinsics which Miri doesn't support. * Address Mazdak's review. Still pending his agreeing with me that `poison` is a better name than `uninit`. * "Poison" -> "uninit" Against my best wishes, for consistency with the broader Rust community's poor choices. * Remove unnecessary `unsafe` blocks * More unnecessary `unsafe`; remove forgotten SAFETY comments
- Loading branch information
Showing
18 changed files
with
225 additions
and
263 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
484ba82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Criterion benchmark results
Criterion benchmark report
YOU SHOULD PROBABLY IGNORE THESE RESULTS.
Criterion is a wall time based benchmarking system that is extremely noisy when run on CI. We collect these results for longitudinal analysis, but they are not reliable for comparing individual PRs.
Go look at the callgrind report instead.
empty
insert_1
insert_bulk
iterate
find_unique
filter
serialize
stdb_module_large_arguments
stdb_module_print_bulk
remaining
484ba82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Callgrind benchmark results
Callgrind Benchmark Report
These benchmarks were run using callgrind,
an instruction-level profiler. They allow comparisons between sqlite (
sqlite
), SpacetimeDB running through a module (stdb_module
), and the underlying SpacetimeDB data storage engine (stdb_raw
). Callgrind emulates a CPU to collect the below estimates.Measurement changes larger than five percent are in bold.
In-memory benchmarks
callgrind: empty transaction
callgrind: filter
callgrind: insert bulk
callgrind: iterate
callgrind: serialize_product_value
callgrind: update bulk
On-disk benchmarks
callgrind: empty transaction
callgrind: filter
callgrind: insert bulk
callgrind: iterate
callgrind: serialize_product_value
callgrind: update bulk