add variable length history key implementation#92
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a generalized “V5h” autogram solver that can use different fixed-size byte-history key implementations (16/24/32/64 bytes) and adds benchmarks/tests around the new variants.
Changes:
- Added
AutogramBytesNoStringsV5h<THistoryKey>plus concrete wrapper classes for 16/24/32/64-byte history keys. - Added new
ByteHistoryKey16/24/32implementations, refactored shared chunk-reading logic, and updatedByteHistoryKey64accordingly. - Extended benchmarks and tests to include the new solver/history-key variants.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| AutogramTest/AutogramTest.cs | Adds a V5h64 solve test and a V5h16 constructor-throws test for oversized alphabets. |
| AutogramBenchmark/ByteHistoryKeyBenchmark.cs | New microbenchmarks for creating/comparing/hashing the various ByteHistoryKey* structs. |
| AutogramBenchmark/AutogramBenchmark.cs | Adds benchmark targets and setup/cleanup for the new V5h16/24/32/64 solvers. |
| Autogram/IByteHistoryKey.cs | Introduces a static-abstract interface to unify history key creation and max length constraints. |
| Autogram/ByteHistoryKeyChunks.cs | Extracts shared “read up to 8 bytes into a ulong chunk” logic for history keys. |
| Autogram/ByteHistoryKey64.cs | Updates ByteHistoryKey64 to be public and to use the shared chunk reader + new interface. |
| Autogram/ByteHistoryKey32.cs | Adds a 32-byte history key implementation. |
| Autogram/ByteHistoryKey24.cs | Adds a 24-byte history key implementation. |
| Autogram/ByteHistoryKey16.cs | Adds a 16-byte history key implementation. |
| Autogram/AutogramBytesNoStringsV5hWrappers.cs | Adds concrete AutogramBytesNoStringsV5h* wrapper types for easier consumption/benchmarking. |
| Autogram/AutogramBytesNoStringsV5h.cs | Adds the generic V5h solver implementation using THistoryKey for history tracking. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/jamesmoore/autogram-solver/sessions/29eae75d-03b5-4ac7-8a8a-1e61befc6689 Co-authored-by: jamesmoore <6506748+jamesmoore@users.noreply.github.com>
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.
No description provided.