Skip to content

Conversation

@SkArchon
Copy link

@SkArchon SkArchon commented Jan 13, 2026

Description

This PR is based off of the PR here #460, I have opened a new PR as this only contains a subset of the changes, and I do not have access to push to the original authors fork.

This PR only contains the iteration function, as well as instead of introducing a new type for the Key and changing the API, we use any.

cc: @ilyatotl, @mangalaman93

Checklist

  • Code compiles correctly and linting passes locally
  • Tests added for new functionality, or regression tests for bug fixes added as applicable

@SkArchon SkArchon requested a review from a team as a code owner January 13, 2026 15:08
@CLAassistant
Copy link

CLAassistant commented Jan 13, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ SkArchon
❌ Ilia Merochkin


Ilia Merochkin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@SkArchon
Copy link
Author

SkArchon commented Jan 13, 2026

@mangalaman93 Please do let me know if this PR is sufficient for merged based on your earlier comment here #460 (review).

I'm assuming based on the CLAssistant, @ilyatotl will need to sign the CLA, if not I might have to squash his commits.

@SkArchon SkArchon changed the title fix: updates fix: iterate on elements Jan 13, 2026
@matthewmcneely
Copy link
Collaborator

@SkArchon While I can appreciate the usefulness of a first class iterator, I'm worried about the increase in overall memory usage this PR will introduce. 16 bytes for the OriginalKey field, which represents a 20% increase in memory use. Not trivial. My guess is this is why the original authors left it out.

Could you not roll-your-own by embedding a Cache inside your own struct? Implement Set and Get and store the keys in a Map, then provide the Iter func from there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants