Repository navigation
Conversation
|
Hey Tommy, thanks for the contribution! Can you say what would be required to undraft this. (Even "Draft until I finish iterating on it" would be fine; the point is just so reviewers know whether they should ignore the PR, and if so, for how long.) Same with your other PRs. |
|
Also, could you say what model you used, and what reasoning level (if you know/remember)? (I'd like to update our AGENTS.md to request this information, and eventually to just mandate that any LLM-generated PRs use large and/or new models. I would also like to know the model size and quantization, though my guess is that no OAI/Anthropic model will answer that request :P) |
|
Draft until I finish iterating on it and hand-read & hand-test the code |
|
Real Tommy here (weird that this kind of needs to be said these days).
Will do!
Haha yeah unlikely :/ Hope the draft PRs aren't too spammy, I'll make sure to review and undraft or close them quickly. |
|
No, I think they're fine. I just check them to see whether they're drafted due to being blocked on some other PR, in which case I'll prioritize that, and otherwise ignore them :). |
Only append a partial byte when one exists, avoiding an unnecessary reallocation and unused byte for byte-aligned or zero-width values. Extend padded round-trip coverage to offsets, storage size and truncated inputs. Written by OpenAI Codex.
df6b61c to
d424b71
Compare
Value::from_padded_bitsalways appends a final byte, even when all bits fit in complete bytes (including zero-width values). For byte-aligned values within the initial allocation cap this exceeds the reserved capacity, triggering a reallocation and retaining an unused zero byte. Only append a partial byte when the bit width has a remainder.Warmed release-mode measurements on macOS ARM64 with Rust 1.99 eliminated one reallocation per aligned decode. The initial 33-pair CPU benchmark measured 64-bit decoding at 76.4 ns before and 64.0 ns after (about 19% less CPU time). Larger values showed a smaller, noisier benefit; this is an isolated decoding measurement.
Extend the existing round-trip test to cover unit, partial-byte, aligned, and optional values at every starting bit offset; check exact backing bytes, consumed bits, and truncated inputs.
Validation:
cargo test --locked --workspace --all-features(120 library tests, 14 sys tests, 2 doctests)cargo test --locked -p simplicity-lang --lib --no-default-features(64 tests)cargo +1.74.0 test --offline --locked -p simplicity-lang --lib --all-features(120 tests)cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets --all-features -- --deny warningsWritten by OpenAI Codex.
Written with GPT 6.1 Sol on Extra High.