Skip to content

add variable length history key implementation#92

Merged
jamesmoore merged 2 commits into
mainfrom
add-variable-length-history-key-implementation
May 23, 2026
Merged

add variable length history key implementation#92
jamesmoore merged 2 commits into
mainfrom
add-variable-length-history-key-implementation

Conversation

@jamesmoore
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/32 implementations, refactored shared chunk-reading logic, and updated ByteHistoryKey64 accordingly.
  • 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.

Comment thread Autogram/ByteHistoryKey64.cs
Comment thread Autogram/AutogramBytesNoStringsV5h.cs
Comment thread AutogramTest/AutogramTest.cs
@jamesmoore jamesmoore merged commit eea168e into main May 23, 2026
4 checks passed
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.

3 participants