compute values on the fly - #38
Merged
Merged
Conversation
phiryll
commented
Jul 16, 2025
Owner
- Compute present/absent/range test values on the fly.
- Test asc/desc separately.
- Add benchmark for All, which currently delegates to Range.
- Fix rangePairs to be evenly distributed.
- Benchmark both dirty and not-dirty ranges.
- Create storeConfigs for unit tests on the fly.
- Rename TestStore to ByteStore.
- Don't need store size to test early yield.
- Remove unnecessary temporary variable.
- Lazily produce subsequences for all-subsets tests.
- Create test configs and test stores on the fly.
- Remove unnecessary index check.
- Move Desc arg handling to Range.
- Refactor BenchmarkAsc/Desc to pull out common code.
- Fix linter errors, shadowing mostly.
- Add interface for makeDirty/refresh methods.
- Return indices instead of sub-slices.
- Minor cleanup.
- Ensure reference stores are not dirty when created.
- Remove Cloneable, just recreate mutated test stores.
- Rename testStore to storeUnderTest.
- Remove benchmarks for Sparse and Dense.
- Remove obsolete benchmark results.
- Minor cleanup.
- Create store configs from sequences instead of maps.
- Create benchmark configs and stores on the fly.
- Compute fuzz configs and stores on the fly.
This changes what the benchmarks measure, so results are not comparable.
Not all lower bounds are equally likely, so choosing that uniformly over the entire set is incorrect.
This reduces confusion with the testStore type.
Some situations, benchmarking in particular, benefit from calculating these once. For those, use slices.Collect to cache the results.
The Go runtime will panic on the following line anyway.
Reserve "low" and "high" for range keys, name test data differently.
This currently only applies to reference, but there will be more implementations.
Also promoted the store field to an embedded ByteStore field. This makes storeUnderTest a Store[byte] with additional metadata.
These will be covered by benchmarking different corpuses later.
Don't create stores unnecessarily during BenchmarkCreate. Rename createTestStores to createStoresUnderTest. Rename benchMeanRandomKeyLen to benchRandomMeanKeyLen. Remove some obsolete comments.
But still collect them once.
phiryll
commented
Jul 16, 2025
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.