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] Drop 'Proxy' from 'TypeSchemeAll' #4317

Merged

Conversation

effectfully
Copy link
Contributor

Do not look here yet.

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'c876b1530' (base) and '3b6e3760d' (PR)

Script c876b15 3b6e376 Change
auction_1-1 324.6 μs 316.5 μs -2.5%
auction_1-2 1.069 ms 1.048 ms -2.0%
auction_1-3 1.072 ms 1.048 ms -2.2%
auction_1-4 425.3 μs 415.1 μs -2.4%
auction_2-1 325.4 μs 317.2 μs -2.5%
auction_2-2 1.072 ms 1.050 ms -2.1%
auction_2-3 1.354 ms 1.327 ms -2.0%
auction_2-4 1.070 ms 1.051 ms -1.8%
auction_2-5 424.6 μs 416.6 μs -1.9%
crowdfunding-success-1 381.5 μs 375.6 μs -1.5%
crowdfunding-success-2 380.8 μs 374.4 μs -1.7%
crowdfunding-success-3 382.9 μs 375.8 μs -1.9%
currency-1 418.7 μs 408.9 μs -2.3%
escrow-redeem_1-1 628.0 μs 614.2 μs -2.2%
escrow-redeem_1-2 625.9 μs 612.8 μs -2.1%
escrow-redeem_2-1 664.8 μs 649.1 μs -2.4%
escrow-redeem_2-2 663.6 μs 646.5 μs -2.6%
escrow-redeem_2-3 666.4 μs 646.6 μs -3.0%
escrow-refund-1 288.1 μs 280.9 μs -2.5%
future-increase-margin-1 415.8 μs 407.6 μs -2.0%
future-increase-margin-2 941.5 μs 917.9 μs -2.5%
future-increase-margin-3 939.4 μs 920.5 μs -2.0%
future-increase-margin-4 873.9 μs 855.7 μs -2.1%
future-increase-margin-5 1.303 ms 1.277 ms -2.0%
future-pay-out-1 414.8 μs 409.2 μs -1.4%
future-pay-out-2 943.4 μs 921.3 μs -2.3%
future-pay-out-3 945.9 μs 923.4 μs -2.4%
future-pay-out-4 1.305 ms 1.279 ms -2.0%
future-settle-early-1 418.8 μs 411.1 μs -1.8%
future-settle-early-2 944.8 μs 925.2 μs -2.1%
future-settle-early-3 941.6 μs 926.3 μs -1.6%
future-settle-early-4 1.016 ms 1000.0 μs -1.6%
game-sm-success_1-1 699.7 μs 689.0 μs -1.5%
game-sm-success_1-2 362.6 μs 353.6 μs -2.5%
game-sm-success_1-3 1.075 ms 1.059 ms -1.5%
game-sm-success_1-4 424.2 μs 413.5 μs -2.5%
game-sm-success_2-1 699.9 μs 687.9 μs -1.7%
game-sm-success_2-2 361.8 μs 353.1 μs -2.4%
game-sm-success_2-3 1.077 ms 1.060 ms -1.6%
game-sm-success_2-4 423.6 μs 412.7 μs -2.6%
game-sm-success_2-5 1.081 ms 1.056 ms -2.3%
game-sm-success_2-6 425.0 μs 412.7 μs -2.9%
multisig-sm-1 712.0 μs 699.6 μs -1.7%
multisig-sm-2 696.4 μs 685.8 μs -1.5%
multisig-sm-3 705.0 μs 691.1 μs -2.0%
multisig-sm-4 712.0 μs 697.7 μs -2.0%
multisig-sm-5 960.0 μs 940.3 μs -2.1%
multisig-sm-6 710.9 μs 699.6 μs -1.6%
multisig-sm-7 696.0 μs 685.5 μs -1.5%
multisig-sm-8 704.4 μs 694.3 μs -1.4%
multisig-sm-9 711.2 μs 701.9 μs -1.3%
multisig-sm-10 960.6 μs 941.7 μs -2.0%
ping-pong-1 582.6 μs 567.6 μs -2.6%
ping-pong-2 580.2 μs 567.3 μs -2.2%
ping-pong_2-1 358.2 μs 349.1 μs -2.5%
prism-1 299.8 μs 292.5 μs -2.4%
prism-2 761.9 μs 748.2 μs -1.8%
prism-3 642.5 μs 630.4 μs -1.9%
pubkey-1 257.7 μs 250.5 μs -2.8%
stablecoin_1-1 1.488 ms 1.465 ms -1.5%
stablecoin_1-2 353.6 μs 344.5 μs -2.6%
stablecoin_1-3 1.692 ms 1.669 ms -1.4%
stablecoin_1-4 375.9 μs 366.8 μs -2.4%
stablecoin_1-5 2.142 ms 2.112 ms -1.4%
stablecoin_1-6 469.0 μs 455.2 μs -2.9%
stablecoin_2-1 1.494 ms 1.473 ms -1.4%
stablecoin_2-2 353.4 μs 345.2 μs -2.3%
stablecoin_2-3 1.695 ms 1.668 ms -1.6%
stablecoin_2-4 375.2 μs 366.1 μs -2.4%
token-account-1 322.9 μs 318.1 μs -1.5%
token-account-2 575.8 μs 563.8 μs -2.1%
uniswap-1 678.3 μs 666.9 μs -1.7%
uniswap-2 388.4 μs 383.9 μs -1.2%
uniswap-3 2.725 ms 2.663 ms -2.3%
uniswap-4 615.4 μs 604.5 μs -1.8%
uniswap-5 1.938 ms 1.895 ms -2.2%
uniswap-6 587.6 μs 576.7 μs -1.9%
vesting-1 599.6 μs 587.6 μs -2.0%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'c876b1530' (base) and 'f01e26a26' (PR)

Script c876b15 f01e26a Change
auction_1-1 324.0 μs 314.0 μs -3.1%
auction_1-2 1.076 ms 1.059 ms -1.6%
auction_1-3 1.077 ms 1.064 ms -1.2%
auction_1-4 426.9 μs 413.6 μs -3.1%
auction_2-1 328.1 μs 315.9 μs -3.7%
auction_2-2 1.073 ms 1.061 ms -1.1%
auction_2-3 1.353 ms 1.341 ms -0.9%
auction_2-4 1.068 ms 1.062 ms -0.6%
auction_2-5 424.2 μs 412.5 μs -2.8%
crowdfunding-success-1 380.5 μs 372.4 μs -2.1%
crowdfunding-success-2 381.4 μs 370.7 μs -2.8%
crowdfunding-success-3 382.2 μs 371.7 μs -2.7%
currency-1 416.9 μs 410.5 μs -1.5%
escrow-redeem_1-1 626.6 μs 614.5 μs -1.9%
escrow-redeem_1-2 625.2 μs 613.1 μs -1.9%
escrow-redeem_2-1 661.8 μs 649.5 μs -1.9%
escrow-redeem_2-2 666.4 μs 648.1 μs -2.7%
escrow-redeem_2-3 666.2 μs 651.4 μs -2.2%
escrow-refund-1 288.2 μs 279.1 μs -3.2%
future-increase-margin-1 417.3 μs 411.5 μs -1.4%
future-increase-margin-2 941.3 μs 922.1 μs -2.0%
future-increase-margin-3 939.2 μs 928.2 μs -1.2%
future-increase-margin-4 872.8 μs 858.9 μs -1.6%
future-increase-margin-5 1.299 ms 1.290 ms -0.7%
future-pay-out-1 416.1 μs 411.0 μs -1.2%
future-pay-out-2 937.5 μs 925.8 μs -1.2%
future-pay-out-3 940.7 μs 924.2 μs -1.8%
future-pay-out-4 1.301 ms 1.283 ms -1.4%
future-settle-early-1 417.4 μs 411.0 μs -1.5%
future-settle-early-2 940.5 μs 922.3 μs -1.9%
future-settle-early-3 943.6 μs 927.2 μs -1.7%
future-settle-early-4 1.022 ms 1.004 ms -1.8%
game-sm-success_1-1 704.7 μs 689.8 μs -2.1%
game-sm-success_1-2 363.7 μs 352.5 μs -3.1%
game-sm-success_1-3 1.076 ms 1.065 ms -1.0%
game-sm-success_1-4 424.0 μs 411.0 μs -3.1%
game-sm-success_2-1 697.4 μs 687.0 μs -1.5%
game-sm-success_2-2 362.1 μs 351.1 μs -3.0%
game-sm-success_2-3 1.075 ms 1.062 ms -1.2%
game-sm-success_2-4 424.1 μs 410.1 μs -3.3%
game-sm-success_2-5 1.077 ms 1.063 ms -1.3%
game-sm-success_2-6 423.6 μs 410.4 μs -3.1%
multisig-sm-1 709.2 μs 699.1 μs -1.4%
multisig-sm-2 694.0 μs 685.5 μs -1.2%
multisig-sm-3 702.7 μs 692.7 μs -1.4%
multisig-sm-4 710.9 μs 701.4 μs -1.3%
multisig-sm-5 961.3 μs 946.1 μs -1.6%
multisig-sm-6 712.2 μs 698.4 μs -1.9%
multisig-sm-7 698.8 μs 685.0 μs -2.0%
multisig-sm-8 706.4 μs 695.8 μs -1.5%
multisig-sm-9 715.7 μs 703.8 μs -1.7%
multisig-sm-10 960.1 μs 949.9 μs -1.1%
ping-pong-1 582.8 μs 571.2 μs -2.0%
ping-pong-2 582.9 μs 570.2 μs -2.2%
ping-pong_2-1 358.4 μs 349.5 μs -2.5%
prism-1 299.9 μs 289.4 μs -3.5%
prism-2 762.2 μs 745.1 μs -2.2%
prism-3 642.3 μs 628.2 μs -2.2%
pubkey-1 257.5 μs 248.3 μs -3.6%
stablecoin_1-1 1.491 ms 1.468 ms -1.5%
stablecoin_1-2 353.4 μs 342.2 μs -3.2%
stablecoin_1-3 1.686 ms 1.665 ms -1.2%
stablecoin_1-4 375.6 μs 363.0 μs -3.4%
stablecoin_1-5 2.138 ms 2.102 ms -1.7%
stablecoin_1-6 465.8 μs 452.7 μs -2.8%
stablecoin_2-1 1.490 ms 1.472 ms -1.2%
stablecoin_2-2 354.3 μs 344.0 μs -2.9%
stablecoin_2-3 1.695 ms 1.674 ms -1.2%
stablecoin_2-4 375.4 μs 364.6 μs -2.9%
token-account-1 322.8 μs 317.4 μs -1.7%
token-account-2 576.6 μs 565.5 μs -1.9%
uniswap-1 680.1 μs 670.8 μs -1.4%
uniswap-2 388.4 μs 382.2 μs -1.6%
uniswap-3 2.737 ms 2.682 ms -2.0%
uniswap-4 619.3 μs 599.7 μs -3.2%
uniswap-5 1.940 ms 1.901 ms -2.0%
uniswap-6 589.5 μs 569.2 μs -3.4%
vesting-1 599.5 μs 589.0 μs -1.8%

@effectfully effectfully requested a review from michaelpj January 8, 2022 18:39
@effectfully
Copy link
Contributor Author

I was going to make these changes a part of a bigger refactoring, but I want to conduct an experiment and that Proxy in TypeSchemeAll gets in the way of the optimizer, so I decided to drop it now (and a couple more of them while I'm here, and the now redundant Arity stuff).

This only deletes code, so I'm not waiting for a review and merging as is.

@effectfully effectfully merged commit 4710dff into master Jan 8, 2022
@effectfully effectfully deleted the effectfully/builtins/drop-Proxy-from-TypeSchemeAll branch January 8, 2022 18:44
Copy link
Contributor

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Nice. And you didn't even need any type applications!

-> TypeScheme term args res
-> TypeScheme term args res

argOf :: TypeScheme term (arg ': args) res -> Proxy arg
Copy link
Contributor

Choose a reason for hiding this comment

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

argProxy? whatever

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.

3 participants