Skip to content

Add ReadOnlyLoaded iterator for the DomainStorageMap#4442

Merged
turbolent merged 3 commits intomasterfrom
janez/readonly-loaded-iterator-for-domain-storage-map
Feb 26, 2026
Merged

Add ReadOnlyLoaded iterator for the DomainStorageMap#4442
turbolent merged 3 commits intomasterfrom
janez/readonly-loaded-iterator-for-domain-storage-map

Conversation

@janezpodhostnik
Copy link
Contributor

@janezpodhostnik janezpodhostnik commented Feb 19, 2026

Description

needed for: onflow/flow-go#8424


  • 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
  • Added appropriate labels

@github-actions
Copy link

github-actions bot commented Feb 19, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions
Copy link

github-actions bot commented Feb 19, 2026

Benchstat comparison

  • Base branch: onflow:master
  • Base commit: fed5d1a
Results

old.txtnew.txt
time/opdelta
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4402µs ± 0%399µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
Emit-44.68ms ± 0%4.60ms ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4273ns ± 0%280ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-478.0ns ± 0%77.8ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-422.9µs ± 0%23.1µs ± 0%~(p=1.000 n=1+1)
InterpretRecursionFib-42.28ms ± 0%2.28ms ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4837ns ± 0%842ns ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-4317ns ± 0%317ns ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4635µs ± 0%630µs ± 0%~(p=1.000 n=1+1)
RuntimeFungibleTokenTransferVM-4725µs ± 0%729µs ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-42.64ms ± 0%2.73ms ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-411.0ms ± 0%11.6ms ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-414.5µs ± 0%14.8µs ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-440.3µs ± 0%40.8µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-462.9ns ± 0%66.2ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4152kB ± 0%152kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
Emit-41.50MB ± 0%1.50MB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4120B ± 0%120B ± 0%~(all equal)
ExportType/simple_type-40.00B 0.00B ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-48.30kB ± 0%8.30kB ± 0%~(all equal)
InterpretRecursionFib-41.19MB ± 0%1.19MB ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4976B ± 0%976B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-4232B ± 0%232B ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4171kB ± 0%170kB ± 0%~(p=1.000 n=1+1)
RuntimeFungibleTokenTransferVM-4193kB ± 0%193kB ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-41.76MB ± 0%1.77MB ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-48.59MB ± 0%8.58MB ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-48.06kB ± 0%8.07kB ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-413.3kB ± 0%13.3kB ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-432.0B ± 0%32.0B ± 0%~(all equal)
 
allocs/opdelta
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-42.47k ± 0%2.47k ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
Emit-440.0k ± 0%40.0k ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-43.00 ± 0%3.00 ± 0%~(all equal)
ExportType/simple_type-40.00 0.00 ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-4176 ± 0%176 ± 0%~(all equal)
InterpretRecursionFib-417.7k ± 0%17.7k ± 0%~(all equal)
NewInterpreter/new_interpreter-415.0 ± 0%15.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-44.00 ± 0%4.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-43.27k ± 0%3.27k ± 0%~(all equal)
RuntimeFungibleTokenTransferVM-43.73k ± 0%3.73k ± 0%~(all equal)
RuntimeResourceDictionaryValues-436.7k ± 0%36.8k ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-4144k ± 0%144k ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-4114 ± 0%114 ± 0%~(all equal)
RuntimeVMInvokeContractImperativeFib-4424 ± 0%424 ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-41.00 ± 0%1.00 ± 0%~(all equal)
 

@fxamacker fxamacker force-pushed the janez/readonly-loaded-iterator-for-domain-storage-map branch from b3d247b to 8a199b8 Compare February 26, 2026 15:35
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@turbolent turbolent merged commit 968dead into master Feb 26, 2026
17 checks passed
@turbolent turbolent deleted the janez/readonly-loaded-iterator-for-domain-storage-map branch February 26, 2026 17:30
@fxamacker
Copy link
Member

Yeah, I will move this to atree later after we confirm there is no additional changes to this needed by flow-go.

I opened this PR in Atree:

Also opened a PR here to remove the wrapper and use the implementation in Atree:

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants