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

Fix parsing of 0_ integer literals #1348

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

turbolent
Copy link
Member

Closes dapperlabs/cadence-private-issues#14


  • 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 Jan 10, 2022

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit b180983
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_interpreter-2946ns ± 6%1013ns ± 7%+7.13%(p=0.022 n=7+6)
NewInterpreter/new_sub-interpreter-21.89µs ± 2%1.97µs ± 5%+4.55%(p=0.035 n=5+6)
RuntimeResourceDictionaryValues-213.7ms ± 6%13.7ms ± 7%~(p=0.902 n=7+7)
RuntimeFungibleTokenTransfer-2961µs ± 4%1079µs ±32%~(p=0.628 n=6+7)
ParseDeploy/byte_array-219.8ms ± 5%20.0ms ± 7%~(p=0.620 n=7+7)
ParseDeploy/decode_hex-21.07ms ± 4%1.09ms ± 6%~(p=0.456 n=7+7)
ParseArray-212.4ms ± 4%12.7ms ± 3%~(p=0.132 n=6+6)
ParseInfix-29.17µs ± 9%9.50µs ±12%~(p=0.295 n=7+6)
ParseFungibleToken-2172µs ± 2%175µs ± 6%~(p=0.945 n=6+7)
QualifiedIdentifierCreation/Three_levels-2130ns ± 4%132ns ± 5%~(p=0.534 n=7+6)
CheckContractInterfaceFungibleTokenConformance-2126µs ± 5%123µs ± 8%~(p=0.240 n=6+6)
ContractInterfaceFungibleToken-237.8µs ± 8%37.8µs ±10%~(p=1.000 n=7+6)
InterpretRecursionFib-22.33ms ± 9%2.38ms ± 7%~(p=0.945 n=7+6)
QualifiedIdentifierCreation/One_level-22.46ns ± 9%2.19ns ± 7%−10.89%(p=0.001 n=7+7)
 
alloc/opdelta
NewInterpreter/new_interpreter-2720B ± 0%768B ± 0%+6.67%(p=0.001 n=7+7)
NewInterpreter/new_sub-interpreter-21.18kB ± 0%1.24kB ± 0%+5.44%(p=0.001 n=7+7)
RuntimeFungibleTokenTransfer-2273kB ± 0%273kB ± 0%+0.05%(p=0.001 n=7+7)
RuntimeResourceDictionaryValues-24.05MB ± 0%4.05MB ± 0%~(p=0.805 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-265.7kB ± 0%65.7kB ± 0%~(all equal)
ContractInterfaceFungibleToken-226.5kB ± 0%26.5kB ± 0%~(p=1.000 n=7+7)
InterpretRecursionFib-21.24MB ± 0%1.24MB ± 0%~(p=0.455 n=6+6)
 
allocs/opdelta
NewInterpreter/new_interpreter-211.0 ± 0%12.0 ± 0%+9.09%(p=0.001 n=7+7)
NewInterpreter/new_sub-interpreter-236.0 ± 0%38.0 ± 0%+5.56%(p=0.001 n=7+7)
RuntimeFungibleTokenTransfer-24.54k ± 0%4.55k ± 0%+0.11%(p=0.001 n=7+7)
RuntimeResourceDictionaryValues-2102k ± 0%102k ± 0%+0.00%(p=0.010 n=7+7)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-21.07k ± 0%1.07k ± 0%~(all equal)
ContractInterfaceFungibleToken-2457 ± 0%457 ± 0%~(all equal)
InterpretRecursionFib-225.0k ± 0%25.0k ± 0%~(all equal)
 

@turbolent turbolent merged commit 95aea4a into master Jan 13, 2022
@turbolent turbolent deleted the bastian/fix-zero-underscore-integer-literal-parsing branch January 13, 2022 17:44
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.

2 participants