Skip to content

Optimize iteration over dictionary keys - #269

Merged
joshuahannan merged 2 commits into
masterfrom
bastian/improve-key-iteration
Apr 7, 2026
Merged

Optimize iteration over dictionary keys#269
joshuahannan merged 2 commits into
masterfrom
bastian/improve-key-iteration

Conversation

@turbolent

Copy link
Copy Markdown
Member

Description

Since Cadence v1.10.0 direct iteration over dictionaries is supported, which avoids temporarily constructing an array of all keys.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer

@turbolent
turbolent requested a review from joshuahannan as a code owner April 7, 2026 17:29
@turbolent turbolent self-assigned this Apr 7, 2026
The `for k in dict` syntax requires Cadence v1.10+. Updated:
- flow-emulator v1.18.0 -> v1.19.0 (ships with Cadence v1.10.0)
- cadence v1.9.10 -> v1.10.0
- flow-go-sdk v1.9.16 -> v1.10.0
- Regenerated Go assets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@joshuahannan joshuahannan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! I ran the tests and updated the PR, so everything looks good!

@joshuahannan
joshuahannan merged commit 9202bfe into master Apr 7, 2026
2 checks passed
@joshuahannan
joshuahannan deleted the bastian/improve-key-iteration branch April 7, 2026 18:50
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.

2 participants