Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert removal of checker caching / #1572 #1628

Merged
merged 1 commit into from
May 9, 2022

Conversation

turbolent
Copy link
Member

Until we have #1570, let us at least remove the spurious errors which are reported at the moment, but reverting the removal of the checker caching: It is important to return the same checker for a location, as the checker performs type equality checks by Go pointer – returning different instances for the same logical types results in confusing errors.


  • 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

@turbolent turbolent requested a review from devbugging May 6, 2022 17:56
@turbolent turbolent requested a review from SupunS as a code owner May 6, 2022 17:56
@turbolent turbolent self-assigned this May 6, 2022
@turbolent turbolent requested a review from dsainati1 as a code owner May 6, 2022 17:56
@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #1628 (6c9df2a) into master (f615bea) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1628   +/-   ##
=======================================
  Coverage   74.73%   74.73%           
=======================================
  Files         288      288           
  Lines       55340    55340           
=======================================
  Hits        41357    41357           
  Misses      12489    12489           
  Partials     1494     1494           
Flag Coverage Δ
unittests 74.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runtime/sema/simple_type.go 92.30% <0.00%> (-3.85%) ⬇️
runtime/interpreter/storage.go 72.78% <0.00%> (+1.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f615bea...6c9df2a. Read the comment docs.

@github-actions
Copy link

github-actions bot commented May 6, 2022

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit f615bea
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Results

old.txtnew.txt
time/opdelta
NewInterpreter/new_sub-interpreter-22.22µs ± 1%2.29µs ± 7%+3.27%(p=0.042 n=7+7)
RuntimeFungibleTokenTransfer-21.28ms ±22%1.32ms ±26%~(p=0.620 n=7+7)
RuntimeResourceDictionaryValues-26.48ms ± 1%6.57ms ± 2%~(p=0.209 n=7+7)
Transfer-284.0ns ± 1%84.7ns ± 2%~(p=0.168 n=6+7)
ParseDeploy/byte_array-221.0ms ± 3%20.8ms ± 2%~(p=0.731 n=6+7)
ParseDeploy/decode_hex-21.16ms ± 0%1.16ms ± 1%~(p=0.937 n=6+6)
ParseInfix-28.44µs ± 1%8.72µs ± 5%~(p=0.181 n=6+7)
ParseArray-212.9ms ± 1%13.0ms ± 4%~(p=0.731 n=6+7)
ParseFungibleToken-2189µs ± 9%188µs ±10%~(p=0.535 n=7+7)
QualifiedIdentifierCreation/One_level-22.34ns ± 0%2.34ns ± 0%~(p=0.688 n=6+6)
QualifiedIdentifierCreation/Three_levels-2141ns ± 3%140ns ± 3%~(p=0.600 n=7+7)
ContractInterfaceFungibleToken-239.2µs ± 1%39.1µs ± 1%~(p=0.628 n=7+6)
CheckContractInterfaceFungibleTokenConformance-2137µs ±11%134µs ± 5%~(p=0.805 n=7+7)
InterpretRecursionFib-22.74ms ± 5%2.72ms ± 2%~(p=0.902 n=7+7)
NewInterpreter/new_interpreter-21.14µs ± 1%1.14µs ± 1%~(p=0.784 n=7+7)
 
alloc/opdelta
RuntimeFungibleTokenTransfer-2273kB ± 0%273kB ± 0%~(p=0.710 n=7+7)
RuntimeResourceDictionaryValues-22.25MB ± 0%2.25MB ± 0%~(p=0.318 n=7+7)
Transfer-248.0B ± 0%48.0B ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
ContractInterfaceFungibleToken-226.7kB ± 0%26.7kB ± 0%~(p=1.000 n=7+7)
CheckContractInterfaceFungibleTokenConformance-266.3kB ± 0%66.3kB ± 0%~(all equal)
NewInterpreter/new_interpreter-2848B ± 0%848B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.34kB ± 0%1.34kB ± 0%~(all equal)
InterpretRecursionFib-21.14MB ± 0%1.14MB ± 0%−0.00%(p=0.021 n=7+7)
 
allocs/opdelta
RuntimeFungibleTokenTransfer-24.58k ± 0%4.58k ± 0%~(p=1.000 n=7+7)
RuntimeResourceDictionaryValues-237.6k ± 0%37.6k ± 0%~(p=0.623 n=7+7)
Transfer-21.00 ± 0%1.00 ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
ContractInterfaceFungibleToken-2460 ± 0%460 ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-21.07k ± 0%1.07k ± 0%~(all equal)
InterpretRecursionFib-223.8k ± 0%23.8k ± 0%~(all equal)
NewInterpreter/new_interpreter-213.0 ± 0%13.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-240.0 ± 0%40.0 ± 0%~(all equal)
 

Copy link
Contributor

@devbugging devbugging left a comment

Choose a reason for hiding this comment

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

Thank you, I was working on this now, but it makes sense to just revert first.

@turbolent turbolent merged commit 1a56547 into master May 9, 2022
@turbolent turbolent deleted the bastian/bring-back-checker-caching branch May 9, 2022 17:46
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.

3 participants