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

[Builtins] Introduce 'HiddenValueOf' #4249

Closed

Conversation

effectfully
Copy link
Contributor

@effectfully effectfully commented Nov 28, 2021

A rebase of #4243, which was based on #4200.

@effectfully effectfully mentioned this pull request Nov 28, 2021
9 tasks
@effectfully
Copy link
Contributor Author

/benchmark

@effectfully effectfully changed the title Introduce 'HiddenValueOf' [Builtins] Introduce 'HiddenValueOf' Nov 28, 2021
@iohk-devops
Copy link

Comparing benchmark results of 'ae5f8b3ff' (base) and '3a5140883' (PR)

Script ae5f8b3 3a51408 Change
auction_1-1 406.3 μs 410.0 μs +0.9%
auction_1-2 1.189 ms 1.193 ms +0.3%
auction_1-3 1.195 ms 1.198 ms +0.3%
auction_1-4 540.7 μs 547.5 μs +1.3%
auction_2-1 408.7 μs 413.1 μs +1.1%
auction_2-2 1.189 ms 1.198 ms +0.8%
auction_2-3 1.498 ms 1.507 ms +0.6%
auction_2-4 1.190 ms 1.202 ms +1.0%
auction_2-5 540.9 μs 546.0 μs +0.9%
crowdfunding-success-1 485.8 μs 488.7 μs +0.6%
crowdfunding-success-2 484.6 μs 487.4 μs +0.6%
crowdfunding-success-3 485.5 μs 487.2 μs +0.4%
currency-1 491.3 μs 493.7 μs +0.5%
escrow-redeem_1-1 749.5 μs 753.7 μs +0.6%
escrow-redeem_1-2 749.2 μs 752.3 μs +0.4%
escrow-redeem_2-1 857.3 μs 858.5 μs +0.1%
escrow-redeem_2-2 858.4 μs 860.3 μs +0.2%
escrow-redeem_2-3 856.2 μs 860.3 μs +0.5%
escrow-refund-1 357.4 μs 360.5 μs +0.9%
future-increase-margin-1 489.8 μs 491.7 μs +0.4%
future-increase-margin-2 1.080 ms 1.086 ms +0.6%
future-increase-margin-3 1.078 ms 1.089 ms +1.0%
future-increase-margin-4 980.4 μs 988.2 μs +0.8%
future-increase-margin-5 1.434 ms 1.441 ms +0.5%
future-pay-out-1 489.7 μs 493.0 μs +0.7%
future-pay-out-2 1.082 ms 1.088 ms +0.6%
future-pay-out-3 1.080 ms 1.084 ms +0.4%
future-pay-out-4 1.433 ms 1.430 ms -0.2%
future-settle-early-1 494.0 μs 491.9 μs -0.4%
future-settle-early-2 1.084 ms 1.087 ms +0.3%
future-settle-early-3 1.083 ms 1.089 ms +0.6%
future-settle-early-4 1.129 ms 1.130 ms +0.1%
game-sm-success_1-1 824.5 μs 825.3 μs +0.1%
game-sm-success_1-2 460.0 μs 464.1 μs +0.9%
game-sm-success_1-3 1.213 ms 1.214 ms +0.1%
game-sm-success_1-4 536.3 μs 544.7 μs +1.6%
game-sm-success_2-1 824.6 μs 829.1 μs +0.5%
game-sm-success_2-2 459.2 μs 464.4 μs +1.1%
game-sm-success_2-3 1.209 ms 1.219 ms +0.8%
game-sm-success_2-4 533.6 μs 543.5 μs +1.9%
game-sm-success_2-5 1.208 ms 1.214 ms +0.5%
game-sm-success_2-6 534.6 μs 542.9 μs +1.6%
multisig-sm-1 827.5 μs 829.1 μs +0.2%
multisig-sm-2 816.8 μs 816.1 μs -0.1%
multisig-sm-3 824.2 μs 824.0 μs -0.0%
multisig-sm-4 832.3 μs 833.5 μs +0.1%
multisig-sm-5 1.077 ms 1.071 ms -0.6%
multisig-sm-6 827.2 μs 828.2 μs +0.1%
multisig-sm-7 817.5 μs 815.9 μs -0.2%
multisig-sm-8 823.4 μs 822.3 μs -0.1%
multisig-sm-9 830.6 μs 832.0 μs +0.2%
multisig-sm-10 1.074 ms 1.075 ms +0.1%
ping-pong-1 687.4 μs 683.0 μs -0.6%
ping-pong-2 687.2 μs 681.6 μs -0.8%
ping-pong_2-1 440.8 μs 440.1 μs -0.2%
prism-1 384.1 μs 385.4 μs +0.3%
prism-2 887.1 μs 888.6 μs +0.2%
prism-3 765.4 μs 770.5 μs +0.7%
pubkey-1 325.6 μs 329.3 μs +1.1%
stablecoin_1-1 1.696 ms 1.694 ms -0.1%
stablecoin_1-2 448.9 μs 451.3 μs +0.5%
stablecoin_1-3 1.935 ms 1.935 ms 0.0%
stablecoin_1-4 477.0 μs 481.3 μs +0.9%
stablecoin_1-5 2.486 ms 2.472 ms -0.6%
stablecoin_1-6 592.4 μs 597.0 μs +0.8%
stablecoin_2-1 1.696 ms 1.689 ms -0.4%
stablecoin_2-2 448.3 μs 452.0 μs +0.8%
stablecoin_2-3 1.945 ms 1.929 ms -0.8%
stablecoin_2-4 476.7 μs 482.2 μs +1.2%
token-account-1 390.5 μs 389.9 μs -0.2%
token-account-2 685.3 μs 685.8 μs +0.1%
uniswap-1 768.1 μs 765.1 μs -0.4%
uniswap-2 473.7 μs 476.2 μs +0.5%
uniswap-3 3.141 ms 3.127 ms -0.4%
uniswap-4 773.9 μs 779.4 μs +0.7%
uniswap-5 2.251 ms 2.256 ms +0.2%
uniswap-6 736.1 μs 748.2 μs +1.6%
vesting-1 697.7 μs 700.8 μs +0.4%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'ae5f8b3ff' (base) and 'e418fc0bc' (PR)

Script ae5f8b3 e418fc0 Change
auction_1-1 403.9 μs 401.8 μs -0.5%
auction_1-2 1.187 ms 1.180 ms -0.6%
auction_1-3 1.191 ms 1.182 ms -0.8%
auction_1-4 541.1 μs 533.1 μs -1.5%
auction_2-1 409.0 μs 403.0 μs -1.5%
auction_2-2 1.190 ms 1.184 ms -0.5%
auction_2-3 1.505 ms 1.491 ms -0.9%
auction_2-4 1.194 ms 1.188 ms -0.5%
auction_2-5 538.3 μs 534.5 μs -0.7%
crowdfunding-success-1 482.6 μs 479.8 μs -0.6%
crowdfunding-success-2 482.9 μs 478.1 μs -1.0%
crowdfunding-success-3 482.4 μs 479.0 μs -0.7%
currency-1 489.0 μs 485.2 μs -0.8%
escrow-redeem_1-1 747.3 μs 740.4 μs -0.9%
escrow-redeem_1-2 747.6 μs 740.7 μs -0.9%
escrow-redeem_2-1 855.1 μs 846.9 μs -1.0%
escrow-redeem_2-2 853.5 μs 845.6 μs -0.9%
escrow-redeem_2-3 853.7 μs 845.5 μs -1.0%
escrow-refund-1 357.9 μs 351.8 μs -1.7%
future-increase-margin-1 492.3 μs 484.2 μs -1.6%
future-increase-margin-2 1.084 ms 1.068 ms -1.5%
future-increase-margin-3 1.082 ms 1.069 ms -1.2%
future-increase-margin-4 981.3 μs 969.8 μs -1.2%
future-increase-margin-5 1.435 ms 1.418 ms -1.2%
future-pay-out-1 491.5 μs 483.2 μs -1.7%
future-pay-out-2 1.080 ms 1.068 ms -1.1%
future-pay-out-3 1.080 ms 1.070 ms -0.9%
future-pay-out-4 1.426 ms 1.423 ms -0.2%
future-settle-early-1 490.8 μs 488.7 μs -0.4%
future-settle-early-2 1.082 ms 1.073 ms -0.8%
future-settle-early-3 1.081 ms 1.071 ms -0.9%
future-settle-early-4 1.127 ms 1.117 ms -0.9%
game-sm-success_1-1 821.6 μs 815.7 μs -0.7%
game-sm-success_1-2 458.3 μs 454.3 μs -0.9%
game-sm-success_1-3 1.208 ms 1.197 ms -0.9%
game-sm-success_1-4 535.0 μs 531.2 μs -0.7%
game-sm-success_2-1 825.7 μs 813.2 μs -1.5%
game-sm-success_2-2 459.0 μs 453.4 μs -1.2%
game-sm-success_2-3 1.210 ms 1.196 ms -1.2%
game-sm-success_2-4 535.6 μs 530.1 μs -1.0%
game-sm-success_2-5 1.210 ms 1.201 ms -0.7%
game-sm-success_2-6 532.1 μs 530.3 μs -0.3%
multisig-sm-1 824.6 μs 816.3 μs -1.0%
multisig-sm-2 813.6 μs 806.2 μs -0.9%
multisig-sm-3 821.7 μs 813.0 μs -1.1%
multisig-sm-4 828.3 μs 819.9 μs -1.0%
multisig-sm-5 1.071 ms 1.066 ms -0.5%
multisig-sm-6 824.2 μs 818.3 μs -0.7%
multisig-sm-7 812.1 μs 809.1 μs -0.4%
multisig-sm-8 823.0 μs 815.6 μs -0.9%
multisig-sm-9 831.9 μs 823.5 μs -1.0%
multisig-sm-10 1.073 ms 1.064 ms -0.8%
ping-pong-1 684.9 μs 675.0 μs -1.4%
ping-pong-2 683.5 μs 672.8 μs -1.6%
ping-pong_2-1 439.3 μs 430.9 μs -1.9%
prism-1 380.9 μs 378.2 μs -0.7%
prism-2 885.6 μs 878.2 μs -0.8%
prism-3 763.4 μs 753.2 μs -1.3%
pubkey-1 326.8 μs 321.3 μs -1.7%
stablecoin_1-1 1.694 ms 1.670 ms -1.4%
stablecoin_1-2 447.5 μs 442.8 μs -1.1%
stablecoin_1-3 1.935 ms 1.905 ms -1.6%
stablecoin_1-4 475.5 μs 472.8 μs -0.6%
stablecoin_1-5 2.474 ms 2.444 ms -1.2%
stablecoin_1-6 589.0 μs 585.4 μs -0.6%
stablecoin_2-1 1.689 ms 1.672 ms -1.0%
stablecoin_2-2 446.7 μs 444.4 μs -0.5%
stablecoin_2-3 1.938 ms 1.912 ms -1.3%
stablecoin_2-4 475.9 μs 472.0 μs -0.8%
token-account-1 389.1 μs 378.4 μs -2.7%
token-account-2 682.3 μs 676.7 μs -0.8%
uniswap-1 763.8 μs 758.3 μs -0.7%
uniswap-2 473.1 μs 468.0 μs -1.1%
uniswap-3 3.151 ms 3.072 ms -2.5%
uniswap-4 775.8 μs 765.2 μs -1.4%
uniswap-5 2.259 ms 2.212 ms -2.1%
uniswap-6 737.8 μs 732.3 μs -0.7%
vesting-1 697.5 μs 687.5 μs -1.4%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'ae5f8b3ff' (base) and '7f4903e8e' (PR)

Script ae5f8b3 7f4903e Change
auction_1-1 405.0 μs 400.3 μs -1.2%
auction_1-2 1.192 ms 1.177 ms -1.3%
auction_1-3 1.195 ms 1.185 ms -0.8%
auction_1-4 539.3 μs 536.5 μs -0.5%
auction_2-1 409.3 μs 404.6 μs -1.1%
auction_2-2 1.194 ms 1.184 ms -0.8%
auction_2-3 1.502 ms 1.491 ms -0.7%
auction_2-4 1.196 ms 1.184 ms -1.0%
auction_2-5 538.7 μs 535.9 μs -0.5%
crowdfunding-success-1 483.8 μs 479.8 μs -0.8%
crowdfunding-success-2 483.0 μs 479.3 μs -0.8%
crowdfunding-success-3 484.1 μs 480.6 μs -0.7%
currency-1 489.6 μs 485.8 μs -0.8%
escrow-redeem_1-1 749.0 μs 737.6 μs -1.5%
escrow-redeem_1-2 749.0 μs 737.3 μs -1.6%
escrow-redeem_2-1 857.3 μs 844.2 μs -1.5%
escrow-redeem_2-2 854.7 μs 841.9 μs -1.5%
escrow-redeem_2-3 854.3 μs 846.9 μs -0.9%
escrow-refund-1 356.8 μs 352.3 μs -1.3%
future-increase-margin-1 490.3 μs 485.3 μs -1.0%
future-increase-margin-2 1.086 ms 1.065 ms -1.9%
future-increase-margin-3 1.086 ms 1.066 ms -1.8%
future-increase-margin-4 984.7 μs 970.2 μs -1.5%
future-increase-margin-5 1.435 ms 1.421 ms -1.0%
future-pay-out-1 490.7 μs 488.1 μs -0.5%
future-pay-out-2 1.080 ms 1.072 ms -0.7%
future-pay-out-3 1.079 ms 1.071 ms -0.7%
future-pay-out-4 1.426 ms 1.418 ms -0.6%
future-settle-early-1 491.3 μs 486.8 μs -0.9%
future-settle-early-2 1.083 ms 1.068 ms -1.4%
future-settle-early-3 1.081 ms 1.067 ms -1.3%
future-settle-early-4 1.131 ms 1.118 ms -1.1%
game-sm-success_1-1 824.8 μs 816.2 μs -1.0%
game-sm-success_1-2 458.6 μs 453.7 μs -1.1%
game-sm-success_1-3 1.211 ms 1.198 ms -1.1%
game-sm-success_1-4 534.9 μs 532.8 μs -0.4%
game-sm-success_2-1 826.6 μs 815.4 μs -1.4%
game-sm-success_2-2 459.0 μs 453.5 μs -1.2%
game-sm-success_2-3 1.215 ms 1.199 ms -1.3%
game-sm-success_2-4 535.3 μs 533.0 μs -0.4%
game-sm-success_2-5 1.213 ms 1.198 ms -1.2%
game-sm-success_2-6 533.4 μs 532.7 μs -0.1%
multisig-sm-1 825.5 μs 817.2 μs -1.0%
multisig-sm-2 815.9 μs 804.6 μs -1.4%
multisig-sm-3 821.3 μs 813.1 μs -1.0%
multisig-sm-4 829.5 μs 819.9 μs -1.2%
multisig-sm-5 1.077 ms 1.064 ms -1.2%
multisig-sm-6 825.3 μs 819.2 μs -0.7%
multisig-sm-7 815.3 μs 809.9 μs -0.7%
multisig-sm-8 822.1 μs 819.4 μs -0.3%
multisig-sm-9 828.6 μs 825.0 μs -0.4%
multisig-sm-10 1.073 ms 1.065 ms -0.7%
ping-pong-1 681.4 μs 674.5 μs -1.0%
ping-pong-2 682.1 μs 675.1 μs -1.0%
ping-pong_2-1 439.8 μs 435.4 μs -1.0%
prism-1 380.9 μs 380.1 μs -0.2%
prism-2 884.2 μs 878.6 μs -0.6%
prism-3 763.4 μs 758.1 μs -0.7%
pubkey-1 325.0 μs 324.3 μs -0.2%
stablecoin_1-1 1.691 ms 1.667 ms -1.4%
stablecoin_1-2 449.2 μs 443.0 μs -1.4%
stablecoin_1-3 1.943 ms 1.904 ms -2.0%
stablecoin_1-4 477.0 μs 473.3 μs -0.8%
stablecoin_1-5 2.482 ms 2.435 ms -1.9%
stablecoin_1-6 590.3 μs 586.9 μs -0.6%
stablecoin_2-1 1.691 ms 1.670 ms -1.2%
stablecoin_2-2 447.9 μs 443.9 μs -0.9%
stablecoin_2-3 1.933 ms 1.911 ms -1.1%
stablecoin_2-4 474.5 μs 472.0 μs -0.5%
token-account-1 389.7 μs 384.8 μs -1.3%
token-account-2 682.1 μs 677.3 μs -0.7%
uniswap-1 764.4 μs 758.5 μs -0.8%
uniswap-2 473.8 μs 471.0 μs -0.6%
uniswap-3 3.150 ms 3.094 ms -1.8%
uniswap-4 772.4 μs 766.8 μs -0.7%
uniswap-5 2.250 ms 2.215 ms -1.6%
uniswap-6 734.6 μs 730.1 μs -0.6%
vesting-1 696.4 μs 688.0 μs -1.2%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'ae5f8b3ff' (base) and '05db7ed2e' (PR)

Script ae5f8b3 05db7ed Change
auction_1-1 404.5 μs 401.7 μs -0.7%
auction_1-2 1.188 ms 1.180 ms -0.7%
auction_1-3 1.193 ms 1.185 ms -0.7%
auction_1-4 538.2 μs 535.9 μs -0.4%
auction_2-1 406.8 μs 404.4 μs -0.6%
auction_2-2 1.187 ms 1.178 ms -0.8%
auction_2-3 1.496 ms 1.483 ms -0.9%
auction_2-4 1.189 ms 1.183 ms -0.5%
auction_2-5 536.3 μs 534.3 μs -0.4%
crowdfunding-success-1 480.6 μs 478.0 μs -0.5%
crowdfunding-success-2 482.3 μs 478.2 μs -0.9%
crowdfunding-success-3 482.6 μs 477.8 μs -1.0%
currency-1 489.3 μs 483.5 μs -1.2%
escrow-redeem_1-1 744.8 μs 738.6 μs -0.8%
escrow-redeem_1-2 745.6 μs 738.6 μs -0.9%
escrow-redeem_2-1 852.6 μs 843.1 μs -1.1%
escrow-redeem_2-2 855.6 μs 846.0 μs -1.1%
escrow-redeem_2-3 855.8 μs 843.6 μs -1.4%
escrow-refund-1 357.6 μs 351.9 μs -1.6%
future-increase-margin-1 491.2 μs 483.6 μs -1.5%
future-increase-margin-2 1.077 ms 1.067 ms -0.9%
future-increase-margin-3 1.077 ms 1.072 ms -0.5%
future-increase-margin-4 978.7 μs 976.3 μs -0.2%
future-increase-margin-5 1.434 ms 1.418 ms -1.1%
future-pay-out-1 488.8 μs 483.7 μs -1.0%
future-pay-out-2 1.076 ms 1.070 ms -0.6%
future-pay-out-3 1.077 ms 1.071 ms -0.6%
future-pay-out-4 1.427 ms 1.414 ms -0.9%
future-settle-early-1 490.0 μs 485.1 μs -1.0%
future-settle-early-2 1.077 ms 1.072 ms -0.5%
future-settle-early-3 1.077 ms 1.072 ms -0.5%
future-settle-early-4 1.125 ms 1.114 ms -1.0%
game-sm-success_1-1 822.0 μs 814.3 μs -0.9%
game-sm-success_1-2 460.2 μs 455.7 μs -1.0%
game-sm-success_1-3 1.212 ms 1.196 ms -1.3%
game-sm-success_1-4 534.4 μs 532.7 μs -0.3%
game-sm-success_2-1 821.5 μs 815.6 μs -0.7%
game-sm-success_2-2 457.6 μs 455.9 μs -0.4%
game-sm-success_2-3 1.204 ms 1.200 ms -0.3%
game-sm-success_2-4 532.4 μs 531.5 μs -0.2%
game-sm-success_2-5 1.208 ms 1.194 ms -1.2%
game-sm-success_2-6 531.1 μs 531.7 μs +0.1%
multisig-sm-1 822.5 μs 815.4 μs -0.9%
multisig-sm-2 811.8 μs 808.3 μs -0.4%
multisig-sm-3 822.3 μs 815.5 μs -0.8%
multisig-sm-4 830.5 μs 822.5 μs -1.0%
multisig-sm-5 1.072 ms 1.066 ms -0.6%
multisig-sm-6 824.1 μs 816.4 μs -0.9%
multisig-sm-7 816.0 μs 809.4 μs -0.8%
multisig-sm-8 821.5 μs 812.9 μs -1.0%
multisig-sm-9 828.2 μs 821.6 μs -0.8%
multisig-sm-10 1.070 ms 1.061 ms -0.8%
ping-pong-1 681.4 μs 672.3 μs -1.3%
ping-pong-2 684.0 μs 671.5 μs -1.8%
ping-pong_2-1 440.9 μs 431.3 μs -2.2%
prism-1 383.1 μs 376.7 μs -1.7%
prism-2 885.3 μs 876.6 μs -1.0%
prism-3 763.8 μs 753.9 μs -1.3%
pubkey-1 327.8 μs 323.3 μs -1.4%
stablecoin_1-1 1.694 ms 1.674 ms -1.2%
stablecoin_1-2 448.7 μs 444.6 μs -0.9%
stablecoin_1-3 1.935 ms 1.908 ms -1.4%
stablecoin_1-4 475.7 μs 472.4 μs -0.7%
stablecoin_1-5 2.469 ms 2.438 ms -1.3%
stablecoin_1-6 590.1 μs 585.1 μs -0.8%
stablecoin_2-1 1.691 ms 1.674 ms -1.0%
stablecoin_2-2 447.4 μs 447.5 μs +0.0%
stablecoin_2-3 1.931 ms 1.919 ms -0.6%
stablecoin_2-4 474.3 μs 475.1 μs +0.2%
token-account-1 389.2 μs 378.2 μs -2.8%
token-account-2 680.8 μs 677.5 μs -0.5%
uniswap-1 765.9 μs 757.1 μs -1.1%
uniswap-2 474.8 μs 468.8 μs -1.3%
uniswap-3 3.149 ms 3.077 ms -2.3%
uniswap-4 774.8 μs 766.6 μs -1.1%
uniswap-5 2.251 ms 2.220 ms -1.4%
uniswap-6 736.7 μs 734.2 μs -0.3%
vesting-1 695.0 μs 690.0 μs -0.7%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'ae5f8b3ff' (base) and '26f5a2cfb' (PR)

Script ae5f8b3 26f5a2c Change
auction_1-1 404.9 μs 400.8 μs -1.0%
auction_1-2 1.188 ms 1.177 ms -0.9%
auction_1-3 1.194 ms 1.182 ms -1.0%
auction_1-4 541.6 μs 534.9 μs -1.2%
auction_2-1 407.6 μs 404.1 μs -0.9%
auction_2-2 1.192 ms 1.186 ms -0.5%
auction_2-3 1.500 ms 1.494 ms -0.4%
auction_2-4 1.195 ms 1.191 ms -0.3%
auction_2-5 537.7 μs 534.9 μs -0.5%
crowdfunding-success-1 482.7 μs 477.1 μs -1.2%
crowdfunding-success-2 483.3 μs 476.5 μs -1.4%
crowdfunding-success-3 483.3 μs 477.0 μs -1.3%
currency-1 490.5 μs 486.1 μs -0.9%
escrow-redeem_1-1 748.1 μs 740.1 μs -1.1%
escrow-redeem_1-2 748.2 μs 740.6 μs -1.0%
escrow-redeem_2-1 855.8 μs 845.1 μs -1.3%
escrow-redeem_2-2 853.8 μs 842.8 μs -1.3%
escrow-redeem_2-3 856.8 μs 843.9 μs -1.5%
escrow-refund-1 358.5 μs 353.3 μs -1.5%
future-increase-margin-1 492.0 μs 486.0 μs -1.2%
future-increase-margin-2 1.082 ms 1.068 ms -1.3%
future-increase-margin-3 1.082 ms 1.070 ms -1.1%
future-increase-margin-4 978.9 μs 970.5 μs -0.9%
future-increase-margin-5 1.431 ms 1.419 ms -0.8%
future-pay-out-1 488.9 μs 486.2 μs -0.6%
future-pay-out-2 1.079 ms 1.071 ms -0.7%
future-pay-out-3 1.078 ms 1.074 ms -0.4%
future-pay-out-4 1.429 ms 1.425 ms -0.3%
future-settle-early-1 491.2 μs 487.7 μs -0.7%
future-settle-early-2 1.082 ms 1.071 ms -1.0%
future-settle-early-3 1.080 ms 1.068 ms -1.1%
future-settle-early-4 1.128 ms 1.116 ms -1.1%
game-sm-success_1-1 822.3 μs 816.5 μs -0.7%
game-sm-success_1-2 459.5 μs 455.0 μs -1.0%
game-sm-success_1-3 1.214 ms 1.199 ms -1.2%
game-sm-success_1-4 535.6 μs 532.1 μs -0.7%
game-sm-success_2-1 824.2 μs 813.3 μs -1.3%
game-sm-success_2-2 459.2 μs 453.4 μs -1.3%
game-sm-success_2-3 1.211 ms 1.201 ms -0.8%
game-sm-success_2-4 534.7 μs 530.9 μs -0.7%
game-sm-success_2-5 1.207 ms 1.200 ms -0.6%
game-sm-success_2-6 534.3 μs 529.9 μs -0.8%
multisig-sm-1 825.1 μs 818.6 μs -0.8%
multisig-sm-2 815.5 μs 808.0 μs -0.9%
multisig-sm-3 820.0 μs 816.9 μs -0.4%
multisig-sm-4 827.6 μs 824.2 μs -0.4%
multisig-sm-5 1.069 ms 1.071 ms +0.2%
multisig-sm-6 823.4 μs 823.7 μs +0.0%
multisig-sm-7 814.0 μs 810.7 μs -0.4%
multisig-sm-8 822.1 μs 821.0 μs -0.1%
multisig-sm-9 831.4 μs 827.4 μs -0.5%
multisig-sm-10 1.074 ms 1.066 ms -0.7%
ping-pong-1 683.7 μs 675.6 μs -1.2%
ping-pong-2 683.7 μs 674.8 μs -1.3%
ping-pong_2-1 438.6 μs 434.2 μs -1.0%
prism-1 381.5 μs 377.1 μs -1.2%
prism-2 885.3 μs 876.7 μs -1.0%
prism-3 764.8 μs 758.7 μs -0.8%
pubkey-1 327.1 μs 321.5 μs -1.7%
stablecoin_1-1 1.694 ms 1.671 ms -1.4%
stablecoin_1-2 448.3 μs 443.4 μs -1.1%
stablecoin_1-3 1.935 ms 1.912 ms -1.2%
stablecoin_1-4 476.6 μs 473.3 μs -0.7%
stablecoin_1-5 2.470 ms 2.446 ms -1.0%
stablecoin_1-6 589.4 μs 584.7 μs -0.8%
stablecoin_2-1 1.690 ms 1.674 ms -0.9%
stablecoin_2-2 446.8 μs 444.1 μs -0.6%
stablecoin_2-3 1.941 ms 1.912 ms -1.5%
stablecoin_2-4 475.6 μs 473.5 μs -0.4%
token-account-1 388.3 μs 379.4 μs -2.3%
token-account-2 682.4 μs 681.8 μs -0.1%
uniswap-1 766.4 μs 757.6 μs -1.1%
uniswap-2 473.8 μs 468.3 μs -1.2%
uniswap-3 3.151 ms 3.100 ms -1.6%
uniswap-4 774.4 μs 765.8 μs -1.1%
uniswap-5 2.258 ms 2.226 ms -1.4%
uniswap-6 736.6 μs 730.9 μs -0.8%
vesting-1 696.8 μs 689.3 μs -1.1%

@effectfully
Copy link
Contributor Author

effectfully commented Nov 29, 2021

@michaelpj so the best I can do here is 0-2% speedup, it seems. Not sure if it's worth the additional complexity. But having that HiddenValueOf is more flexible than what we have currently, e.g. it's quite easy to extend HiddenValueOf with budgeting info to optimize costing of lists etc.

@michaelpj
Copy link
Contributor

But having that HiddenValueOf is more flexible than what we have currently, e.g. it's quite easy to extend HiddenValueOf with budgeting info to optimize costing of lists etc.

I'm not quite sure I follow. You mean so we can have a cached memory usage computation in the value? but couldn't we do that arleady?

I'm not sure I want flexibility that we don't currently use, and this is quite a bit more complicated...

@effectfully
Copy link
Contributor Author

I'm not quite sure I follow. You mean so we can have a cached memory usage computation in the value? but couldn't we do that arleady?

We can, but in a much less convenient way. Currently if you want to attach something to a type, you have to create a new type and put that one into the universe (and remove the old one). This is due to constants being stored in Some (ValueOf uni) with ValueOf being

data ValueOf uni = forall a. ValueOf !(uni a) !a

i.e. any value of a built-in type has to be stored as is without any annotations and the type of that value has to appear in the unvierse.

With the current PR "what we can support" and "how things are represented" are decoupled, so it's easy to change the representation of a type without touching the universe at all. This is quite more flexible and allows us to change the internals without breaking any API.

@thealmarty
Copy link
Contributor

I vote to keep things simple unless we need the flexibility now. (Yes I'm a YAGNI person)

@effectfully
Copy link
Contributor Author

Let's close that for now, it conflicts with everything anyway.

@kwxm kwxm deleted the effectfully/builtins/introduce-HiddenValueOf-2 branch February 2, 2022 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants