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

SCP-2289: Try making a special "for evaluation" term type #3340

Closed
wants to merge 1 commit into from

Conversation

michaelpj
Copy link
Contributor

Another one of Ed's suggestions. I got rid of annotations and replaced
names with Uniques directly, which we can even unpack into the term.

This seems to have better Core: indeed, it gets rid of some wrapping and
unwrapping when looking up or inserting variable mappings.

But the result is overall much worse.

Again, I am baffled. We do a traversal before, and potentially a traversal at the end or when we make errors, but all of that should be lazy. So I don't understand how we can be causing such massive slowdowns. Ideas welcome, again!

crowdfunding/1                           733.6 μs        1.094 ms       +49.1%
crowdfunding/2                           733.7 μs        1.093 ms       +49.0%
crowdfunding/3                           733.2 μs        1.092 ms       +48.9%
crowdfunding/4                           299.0 μs        491.4 μs       +64.3%
crowdfunding/5                           298.9 μs        491.2 μs       +64.3%
future/1                                 355.0 μs        501.0 μs       +41.1%
future/2                                 876.1 μs        1.236 ms       +41.1%
future/3                                 875.2 μs        1.236 ms       +41.2%
future/4                                 1.111 ms        1.892 ms       +70.3%
future/5                                 1.384 ms        2.133 ms       +54.1%
future/6                                 1.121 ms        1.902 ms       +69.7%
future/7                                 1.385 ms        2.133 ms       +54.0%
multisigSM/1                             737.7 μs        1.433 ms       +94.3%
multisigSM/2                             734.7 μs        1.435 ms       +95.3%
multisigSM/3                             753.4 μs        1.472 ms       +95.4%
multisigSM/4                             769.4 μs        1.476 ms       +91.8%
multisigSM/5                             937.7 μs        1.671 ms       +78.2%
multisigSM/6                             735.8 μs        1.443 ms       +96.1%
multisigSM/7                             730.4 μs        1.443 ms       +97.6%
multisigSM/8                             754.6 μs        1.466 ms       +94.3%
multisigSM/9                             773.3 μs        1.475 ms       +90.7%
multisigSM/10                            942.9 μs        1.667 ms       +76.8%
vesting/1                                715.6 μs        1.087 ms       +51.9%
vesting/2                                591.0 μs        947.8 μs       +60.4%
vesting/3                                714.7 μs        1.083 ms       +51.5%
marlowe/trustfund/1                      2.137 ms        4.004 ms       +87.4%
marlowe/trustfund/2                      1.539 ms        3.484 ms       +126.4%
marlowe/zerocoupon/1                     2.223 ms        4.124 ms       +85.5%
marlowe/zerocoupon/2                     1.333 ms        3.284 ms       +146.4%

Pre-submit checklist:

  • Branch
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
    • Formatting, materialized Nix files, PNG optimization, etc. are updated
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Pre-merge checklist:

  • Someone approved it
  • Commits have useful messages
  • Review clarifications made it into the code
  • History is moderately tidy; or going to squash-merge

@michaelpj
Copy link
Contributor Author

Or maybe I just can't get my head around the idea that a simple recursive traversal of the term could take 136% of the time to evaluate it. Surely not???

@michaelpj
Copy link
Contributor Author

I guess I can try pulling it out of the benchmarked part and see...

Copy link
Contributor

@effectfully effectfully left a comment

Choose a reason for hiding this comment

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

We do a traversal before, and potentially a traversal at the end or when we make errors, but all of that should be lazy.

Doesn't look lazy to me. Everything is spine-strict, so forcing to WHNF is forcing to NF.

What benefits do we get by introducing ETerm? Previously, we'd only once pattern match on every AST node of a Term and the rest of the time deal with CekValues. Now we match on each AST node of a Term once and then on each AST node of a ETerm once and the rest is the same. What's the point?

Maybe Edward meant that we should change the on-chain representation? Then it would take us less time to construct the original Term with all the junk in it and we wouldn't need one more traversal.

| VDelay (Term Name uni fun ()) (CekValEnv uni fun)
| VLamAbs Name (Term Name uni fun ()) (CekValEnv uni fun)
| VDelay (ETerm uni fun) (CekValEnv uni fun)
| VLamAbs !Unique (ETerm uni fun) (CekValEnv uni fun)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need a completely new type of terms to replace names with uniques?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, this way GHC knows statically that the name is a Unique and can unpack it and also just pass it directly to IntMap functions. I think it's doing that automatically (or at least, adding UNPACK pragmas here made no difference).

@effectfully
Copy link
Contributor

BTW, your stats look too shaky, are you sure there's no crazy variance in there?

@michaelpj
Copy link
Contributor Author

Doesn't look lazy to me. Everything is spine-strict, so forcing to WHNF is forcing to NF.

Yeah, but we always return them in a lazy Just or similar. Also I checked by replacing etermToTerm with const Error () and it made no difference.

Previously, we'd only once pattern match on every AST node of a Term and the rest of the time deal with CekValues.

That's not quite true. CekValue contains terms, and we'll compute them multiple times. If we apply a lambda to 4 different arguments we will compute the term inside the CekValue 4 times.

Maybe Edward meant that we should change the on-chain representation? Then it would take us less time to construct the original Term with all the junk in it and we wouldn't need one more traversal.

If it's truly the case that it's the initial traversal that causes this then yeah, we'd have to do something like that.

BTW, your stats look too shaky, are you sure there's no crazy variance in there?

I ran it both yesterday and today on the benchmarking machine and got the same results. They're just quite weird!

@michaelpj
Copy link
Contributor Author

So overall what I thought we might get is:

  • Pattern matches are smaller: no pointless annotations
  • Working with Uniques monomorphically means GHC can just pass them directly, can unpack them etc.

I thought this might be a small improvement at best, I'm just baffled that it's instead much slower!

@effectfully
Copy link
Contributor

Yeah, but we always return them in a lazy Just or similar. Also I checked by replacing etermToTerm with const Error () and it made no difference.

I thought you meant termToETerm rather than etermToTerm.

That's not quite true. CekValue contains terms, and we'll compute them multiple times. If we apply a lambda to 4 different arguments we will compute the term inside the CekValue 4 times.

Yeah, you're right.

I thought this might be a small improvement at best, I'm just baffled that it's instead much slower!

How about adding termToTerm on top of master that just traverses its argument and returns it back to see how much the traversal costs us?

@kwxm
Copy link
Contributor

kwxm commented Jun 11, 2021

I tried the Marlowe benchmarks on my laptop and got this:

marlowe/trustfund/1       4.033 ms	 7.354 ms       +82.3%
marlowe/trustfund/2       2.933 ms	 6.381 ms       +117.6%
marlowe/zerocoupon/1      4.361 ms	 7.483 ms       +71.6%
marlowe/zerocoupon/2      2.566 ms	 6.055 ms       +136.0%

and then I removed the exclamation marks from the ETerm constructors apart from EConst and I got this

marlowe/trustfund/1       4.033 ms	 5.465 ms       +35.5%
marlowe/trustfund/2       2.933 ms	 4.075 ms       +38.9%
marlowe/zerocoupon/1      4.361 ms	 5.606 ms       +28.5%
marlowe/zerocoupon/2      2.566 ms	 3.656 ms       +42.5%

(master on the left in both cases), so making it strict seems harmful (I tried that with the existing Term type a while ago and also got bad results). I suppose the conversion isn't just traversing the term, but also allocating memory, which will slow things down too. We did get a pretty decent speedup when we removed the traversal that was adding memory annotations to the AST, even though just before we removed it it was just annotating everything with 0.

I suggest moving the ETerm type into a separate file and doing the conversion before the benchmarking, and seeing what happens then (although you'll have to make sure the conversion really does get done before Criterion gets hold of the AST, and I'm never totally confident that I'm doing that kind of thing correctly).

@michaelpj michaelpj force-pushed the mpj/term-for-eval branch 2 times, most recently from 5a4ec29 to d69ad7f Compare June 28, 2021 14:20
@michaelpj
Copy link
Contributor Author

/benchmark

@effectfully
Copy link
Contributor

/benchmark

😲

@effectfully
Copy link
Contributor

Whoooooops, really sorry about retriggering the benchmarks!

@effectfully
Copy link
Contributor

Maybe only trigger the benchmarks if that command is the only thing appearing in the comment?

@michaelpj
Copy link
Contributor Author

Haha, amazing. You do have to say it with the slash, so it should mostly be safe if you don't literally quote someone else saying it :p

@michaelpj
Copy link
Contributor Author

(It's broken still, working on it)

/benchmark

@michaelpj michaelpj force-pushed the mpj/term-for-eval branch 2 times, most recently from 1d56eb8 to 1d331a6 Compare June 28, 2021 14:36
@michaelpj
Copy link
Contributor Author

/benchmark

@michaelpj
Copy link
Contributor Author

/benchmark

1 similar comment
@michaelpj
Copy link
Contributor Author

/benchmark

Another one of Ed's suggestions. I got rid of annotations and replaced
names with `Unique`s directly, which we can even unpack into the term.

This seems to have better Core: indeed, it gets rid of some wrapping and
unwrapping when looking up or inserting variable mappings.

But the result is overall much worse.
@michaelpj
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

iohk-devops commented Jun 28, 2021

crowdfunding/crowdfunding-success-1         696.1 μs	   627.9 μs       -9.8%
crowdfunding/crowdfunding-success-2         696.2 μs	   631.3 μs       -9.3%
crowdfunding/crowdfunding-success-3         694.8 μs	   631.0 μs       -9.2%
currency/currency-1                         626.5 μs	   570.2 μs       -9.0%
currency/currency-2                         805.6 μs	   780.6 μs       -3.1%
escrow/escrow-redeem_1-1                    962.7 μs	   933.2 μs       -3.1%
escrow/escrow-redeem_1-2                    962.0 μs	   934.1 μs       -2.9%
escrow/escrow-redeem_2-1                    1.104 ms	   1.070 ms       -3.1%
escrow/escrow-redeem_2-2                    1.104 ms	   1.070 ms       -3.1%
escrow/escrow-redeem_2-3                    1.102 ms	   1.069 ms       -3.0%
escrow/escrow-refund-1                      477.0 μs	   440.5 μs       -7.7%
future/future-increase-margin-1             625.3 μs	   568.0 μs       -9.2%
future/future-increase-margin-2             808.5 μs	   776.4 μs       -4.0%
future/future-increase-margin-3             1.396 ms	   1.349 ms       -3.4%
future/future-increase-margin-4             1.402 ms	   1.351 ms       -3.6%
future/future-increase-margin-5             1.306 ms	   1.250 ms       -4.3%
future/future-increase-margin-6             1.936 ms	   1.729 ms       -10.7%
future/future-pay-out-1                     627.5 μs	   566.1 μs       -9.8%
future/future-pay-out-2                     810.4 μs	   776.5 μs       -4.2%
future/future-pay-out-3                     1.394 ms	   1.350 ms       -3.2%
future/future-pay-out-4                     1.392 ms	   1.350 ms       -3.0%
future/future-pay-out-5                     1.809 ms	   1.723 ms       -4.8%
future/future-settle-early-1                626.5 μs	   567.3 μs       -9.4%
future/future-settle-early-2                808.3 μs	   777.1 μs       -3.9%
future/future-settle-early-3                1.396 ms	   1.353 ms       -3.1%
future/future-settle-early-4                1.402 ms	   1.357 ms       -3.2%
future/future-settle-early-5                1.435 ms	   1.383 ms       -3.6%
game-sm/game-sm-success-1                   1.004 ms	   967.0 μs       -3.7%
game-sm/game-sm-success-2                   537.5 μs	   586.4 μs       +9.1%
game-sm/game-sm-success-3                   1.446 ms	   1.409 ms       -2.6%
game-sm/game-sm-success-4                   750.9 μs	   702.3 μs       -6.5%
game-sm/game-sm-success_2-1                 1.004 ms	   969.7 μs       -3.4%
game-sm/game-sm-success_2-2                 537.7 μs	   584.4 μs       +8.7%
game-sm/game-sm-success_2-3                 1.447 ms	   1.406 ms       -2.8%
game-sm/game-sm-success_2-4                 751.4 μs	   700.9 μs       -6.7%
game-sm/game-sm-success_2-5                 1.466 ms	   1.381 ms       -5.8%
game-sm/game-sm-success_2-6                 749.6 μs	   695.0 μs       -7.3%
multisig-sm/multisig-sm-01                  1.059 ms	   1.026 ms       -3.1%
multisig-sm/multisig-sm-02                  1.068 ms	   1.029 ms       -3.7%
multisig-sm/multisig-sm-03                  1.084 ms	   1.045 ms       -3.6%
multisig-sm/multisig-sm-04                  1.100 ms	   1.057 ms       -3.9%
multisig-sm/multisig-sm-05                  1.299 ms	   1.251 ms       -3.7%
multisig-sm/multisig-sm-06                  1.157 ms	   1.025 ms       -11.4%
multisig-sm/multisig-sm-07                  1.067 ms	   1.030 ms       -3.5%
multisig-sm/multisig-sm-08                  1.083 ms	   1.138 ms       +5.1%
multisig-sm/multisig-sm-09                  1.102 ms	   1.062 ms       -3.6%
multisig-sm/multisig-sm-10                  1.305 ms	   1.260 ms       -3.4%
ping-pong/ping-pong-1                       833.0 μs	   772.6 μs       -7.3%
ping-pong/ping-pong-2                       834.2 μs	   771.5 μs       -7.5%
ping-pong/ping-pong_2-1                     529.5 μs	   478.0 μs       -9.7%
prism/prism-1                               499.2 μs	   457.0 μs       -8.5%
prism/prism-2                               1.089 ms	   1.038 ms       -4.7%
prism/prism-3                               991.4 μs	   950.5 μs       -4.1%
pubkey/pubkey-1                             443.1 μs	   401.9 μs       -9.3%
stablecoin/stablecoin_1-1                   2.100 ms	   2.034 ms       -3.1%
stablecoin/stablecoin_1-2                   633.3 μs	   574.8 μs       -9.2%
stablecoin/stablecoin_1-3                   2.369 ms	   2.295 ms       -3.1%
stablecoin/stablecoin_1-4                   687.1 μs	   626.7 μs       -8.8%
stablecoin/stablecoin_1-5                   2.871 ms	   2.955 ms       +2.9%
stablecoin/stablecoin_1-6                   719.9 μs	   807.0 μs       +12.1%
stablecoin/stablecoin_2-1                   2.091 ms	   2.045 ms       -2.2%
stablecoin/stablecoin_2-2                   631.8 μs	   577.4 μs       -8.6%
stablecoin/stablecoin_2-3                   2.359 ms	   2.323 ms       -1.5%
stablecoin/stablecoin_2-4                   685.5 μs	   626.9 μs       -8.5%
token-account/token-account-1               594.0 μs	   540.0 μs       -9.1%
token-account/token-account-2               695.9 μs	   636.6 μs       -8.5%
token-account/token-account-3               885.2 μs	   849.9 μs       -4.0%
uniswap/uniswap-1                           698.8 μs	   630.6 μs       -9.8%
uniswap/uniswap-2                           1.114 ms	   1.072 ms       -3.8%
uniswap/uniswap-3                           756.0 μs	   697.2 μs       -7.8%
uniswap/uniswap-4                           831.2 μs	   794.6 μs       -4.4%
uniswap/uniswap-5                           3.882 ms	   3.750 ms       -3.4%
uniswap/uniswap-6                           1.128 ms	   1.075 ms       -4.7%
uniswap/uniswap-7                           2.799 ms	   2.816 ms       +0.6%
uniswap/uniswap-8                           1.070 ms	   1.073 ms       +0.3%
vesting/vesting-1                           900.4 μs	   868.2 μs       -3.6%
marlowe/trustfund/trustfund-1               2.101 ms	   2.015 ms       -4.1%
marlowe/trustfund/trustfund-2               1.503 ms	   1.473 ms       -2.0%
marlowe/zerocoupon/zerocoupon-1             2.173 ms	   2.116 ms       -2.6%
marlowe/zerocoupon/zerocoupon-2             1.303 ms	   1.283 ms       -1.5%

[kwxm: edited to add backticks for better legibility]

@kwxm
Copy link
Contributor

kwxm commented Jun 28, 2021

stablecoin/stablecoin_1-6 719.9 μs 807.0 μs +12.1%

AGAIN???? https://input-output-rnd.slack.com/archives/G01EE4NQ9U0/p1624872008442400?thread_ts=1624872002.442300&cid=G01EE4NQ9U0

@kwxm
Copy link
Contributor

kwxm commented Jun 29, 2021

So what's going on here? The original benchmarks for this PR showed that it made things much worse, but now it's an improvement and there have been no other commits in the interim.

@michaelpj
Copy link
Contributor Author

Also some in the game state machine. Quite odd.

@michaelpj
Copy link
Contributor Author

So what's going on here? The original benchmarks for this PR showed that it made things much worse, but now it's an improvement and there have been no other commits in the interim.

No, I squashed some stuff in. In particular I pulled the conversion to ETerm out of the part that gets benchmarked. I think that's fair because in a "proper" version of this we could e.g. push that right into deserialization. We can't quite do that now because of the intervening conversion from de Bruijn indices, but once we're not doing that, I even included an instance for Flat (ETerm uni fun) such that you can basically deserialize something you serialized as a Term. So that should really be cheap.

@kwxm
Copy link
Contributor

kwxm commented Jun 29, 2021

I pulled the conversion to ETerm out of the part that gets benchmarked.

Oh, right. I should have re-read the other comments!

@kwxm
Copy link
Contributor

kwxm commented Jun 29, 2021

Also some in the game state machine. Quite odd.

Those are exactly the same scripts that were anomalous in your frames PR last week. I'd like to know what's going on there. I spent about 3 hours talking to @bezirg about the similar thing with stablecoin_1-6 yesterday and we couldn't come to any sensible conclusion (partly because we spent a lot of time talking past each other: it eventually appeared to be the case that we'd done two completely different things that both caused slowdowns in the same script). The only possibility that we were able to come up with was that the contents of TxInfo had been re-ordered and it was taking longer to look something up. The slowdown was something like 17% though, so it would be surprising if looking stuff up was causing that (although other scripts had largish speedups that we didn't examine which could be due to the same thing). Maybe built-in Data will help.

@michaelpj
Copy link
Contributor Author

Random guess: the ones that regress are ones that are quite fast already. If they're scripts that do something like (say) look through the list of outputs to verify that someone is paid appropriately, then maybe reordering so that the output they're looking for is later could have an effect.

@@ -165,3 +171,47 @@ erase (TPLC.Error ann _) = Error ann
-- | Erase a Typed Plutus Core Program to its untyped counterpart.
eraseProgram :: TPLC.Program tyname name uni fun ann -> Program name uni fun ann
eraseProgram (TPLC.Program a v t) = Program a v $ erase t

{-|
A specialized version of 'Term' for evaluation. The 'name' and 'a' parameters are specialized to 'Name' ('Unique') and '()' (omitted).
Copy link
Contributor

@kwxm kwxm Jun 29, 2021

Choose a reason for hiding this comment

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

Hasn't a disappeared entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what I was getting at with "... specialized to () (omitted)". I can make it clearer.

encode = \case
EVar n -> encodeTerm 0 <> encode n
EDelay t -> encodeTerm 1 <> encode t
ELamAbs n t -> encodeTerm 2 <> encode n <> encode t
Copy link
Contributor

Choose a reason for hiding this comment

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

No Binder optimization here? :(

Copy link
Contributor

Choose a reason for hiding this comment

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

Disregard what I said, we need to encode n since we are currently evaluating using uniques in cek environment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is not a debruijn ETerm!

deriving stock (Show, Functor, Generic)
deriving anyclass (NFData)

termToETerm :: Term TPLC.Name uni fun () -> ETerm uni fun
Copy link
Contributor

Choose a reason for hiding this comment

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

why not more generalized argument: Term Name uni fun a?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because that throws away information silently, this does not. Here you have to explicitly opt-in to throwing away any annotations yourself before calling this.

More generally: ETerm uni fun === Term Name uni fun (), and these functions witness that.

@@ -416,7 +417,7 @@ throwingDischarged
-> t
-> CekValue uni fun
-> CekM uni fun s x
throwingDischarged l t = throwingWithCause l t . Just . dischargeCekValue
throwingDischarged l t = throwingWithCause l t . Just . etermToTerm . dischargeCekValue
Copy link
Contributor

Choose a reason for hiding this comment

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

What do we gain by going back to Term here? Wouldn't it simpler that throwingwithcause operated directly on ETerms?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is a leftover from when I switched to making the interface to the CEK machine just use ETerms.

@@ -141,4 +141,7 @@ readKnownCek
=> MachineParameters CekMachineCosts CekValue uni fun
-> Term Name uni fun ()
-> Either (CekEvaluationException uni fun) a
readKnownCek params = evaluateCekNoEmit params >=> readKnown
readKnownCek params t = do
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this readknowncek are used only in testing. what if we maded the KnownType class work on ETerm's directly?

@kwxm
Copy link
Contributor

kwxm commented Jun 30, 2021

/benchmark

@iohk-devops
Copy link

iohk-devops commented Jun 30, 2021

crowdfunding/crowdfunding-success-1         694.3 μs	   629.9 μs       -9.3%
crowdfunding/crowdfunding-success-2         697.8 μs	   633.6 μs       -9.2%
crowdfunding/crowdfunding-success-3         697.0 μs	   633.8 μs       -9.1%
currency/currency-1                         629.2 μs	   568.7 μs       -9.6%
currency/currency-2                         811.4 μs	   779.0 μs       -4.0%
escrow/escrow-redeem_1-1                    967.8 μs	   930.6 μs       -3.8%
escrow/escrow-redeem_1-2                    967.2 μs	   931.8 μs       -3.7%
escrow/escrow-redeem_2-1                    1.110 ms	   1.065 ms       -4.1%
escrow/escrow-redeem_2-2                    1.110 ms	   1.065 ms       -4.1%
escrow/escrow-redeem_2-3                    1.110 ms	   1.064 ms       -4.1%
escrow/escrow-refund-1                      479.5 μs	   437.9 μs       -8.7%
future/future-increase-margin-1             629.8 μs	   567.7 μs       -9.9%
future/future-increase-margin-2             811.0 μs	   778.1 μs       -4.1%
future/future-increase-margin-3             1.398 ms	   1.356 ms       -3.0%
future/future-increase-margin-4             1.398 ms	   1.356 ms       -3.0%
future/future-increase-margin-5             1.302 ms	   1.254 ms       -3.7%
future/future-increase-margin-6             1.936 ms	   1.743 ms       -10.0%
future/future-pay-out-1                     631.6 μs	   568.3 μs       -10.0%
future/future-pay-out-2                     814.5 μs	   779.9 μs       -4.2%
future/future-pay-out-3                     1.402 ms	   1.355 ms       -3.4%
future/future-pay-out-4                     1.404 ms	   1.357 ms       -3.3%
future/future-pay-out-5                     1.826 ms	   1.730 ms       -5.3%
future/future-settle-early-1                630.3 μs	   569.2 μs       -9.7%
future/future-settle-early-2                811.9 μs	   780.0 μs       -3.9%
future/future-settle-early-3                1.404 ms	   1.355 ms       -3.5%
future/future-settle-early-4                1.403 ms	   1.356 ms       -3.3%
future/future-settle-early-5                1.436 ms	   1.378 ms       -4.0%
game-sm/game-sm-success-1                   1.003 ms	   965.6 μs       -3.7%
game-sm/game-sm-success-2                   537.3 μs	   583.5 μs       +8.6%
game-sm/game-sm-success-3                   1.441 ms	   1.405 ms       -2.5%
game-sm/game-sm-success-4                   748.9 μs	   697.8 μs       -6.8%
game-sm/game-sm-success_2-1                 1.001 ms	   964.4 μs       -3.7%
game-sm/game-sm-success_2-2                 536.6 μs	   583.5 μs       +8.7%
game-sm/game-sm-success_2-3                 1.451 ms	   1.400 ms       -3.5%
game-sm/game-sm-success_2-4                 753.9 μs	   698.1 μs       -7.4%
game-sm/game-sm-success_2-5                 1.471 ms	   1.386 ms       -5.8%
game-sm/game-sm-success_2-6                 750.9 μs	   698.1 μs       -7.0%
multisig-sm/multisig-sm-01                  1.065 ms	   1.033 ms       -3.0%
multisig-sm/multisig-sm-02                  1.074 ms	   1.035 ms       -3.6%
multisig-sm/multisig-sm-03                  1.090 ms	   1.052 ms       -3.5%
multisig-sm/multisig-sm-04                  1.106 ms	   1.063 ms       -3.9%
multisig-sm/multisig-sm-05                  1.305 ms	   1.258 ms       -3.6%
multisig-sm/multisig-sm-06                  1.163 ms	   1.030 ms       -11.4%
multisig-sm/multisig-sm-07                  1.072 ms	   1.028 ms       -4.1%
multisig-sm/multisig-sm-08                  1.087 ms	   1.136 ms       +4.5%
multisig-sm/multisig-sm-09                  1.105 ms	   1.059 ms       -4.2%
multisig-sm/multisig-sm-10                  1.299 ms	   1.254 ms       -3.5%
ping-pong/ping-pong-1                       830.0 μs	   771.9 μs       -7.0%
ping-pong/ping-pong-2                       830.9 μs	   776.4 μs       -6.6%
ping-pong/ping-pong_2-1                     528.3 μs	   478.1 μs       -9.5%
prism/prism-1                               496.3 μs	   457.7 μs       -7.8%
prism/prism-2                               1.093 ms	   1.043 ms       -4.6%
prism/prism-3                               989.0 μs	   952.0 μs       -3.7%
pubkey/pubkey-1                             444.3 μs	   403.2 μs       -9.3%
stablecoin/stablecoin_1-1                   2.122 ms	   2.048 ms       -3.5%
stablecoin/stablecoin_1-2                   634.2 μs	   576.6 μs       -9.1%
stablecoin/stablecoin_1-3                   2.374 ms	   2.305 ms       -2.9%
stablecoin/stablecoin_1-4                   688.4 μs	   628.0 μs       -8.8%
stablecoin/stablecoin_1-5                   2.885 ms	   2.941 ms       +1.9%
stablecoin/stablecoin_1-6                   721.4 μs	   805.8 μs       +11.7%
stablecoin/stablecoin_2-1                   2.095 ms	   2.040 ms       -2.6%
stablecoin/stablecoin_2-2                   632.9 μs	   574.5 μs       -9.2%
stablecoin/stablecoin_2-3                   2.363 ms	   2.315 ms       -2.0%
stablecoin/stablecoin_2-4                   687.3 μs	   627.0 μs       -8.8%
token-account/token-account-1               593.7 μs	   540.8 μs       -8.9%
token-account/token-account-2               693.7 μs	   639.2 μs       -7.9%
token-account/token-account-3               881.8 μs	   853.1 μs       -3.3%
uniswap/uniswap-1                           699.8 μs	   633.8 μs       -9.4%
uniswap/uniswap-2                           1.113 ms	   1.076 ms       -3.3%
uniswap/uniswap-3                           757.3 μs	   699.6 μs       -7.6%
uniswap/uniswap-4                           833.1 μs	   796.6 μs       -4.4%
uniswap/uniswap-5                           3.897 ms	   3.763 ms       -3.4%
uniswap/uniswap-6                           1.128 ms	   1.073 ms       -4.9%
uniswap/uniswap-7                           2.801 ms	   2.716 ms       -3.0%
uniswap/uniswap-8                           1.070 ms	   1.016 ms       -5.0%
vesting/vesting-1                           901.1 μs	   864.0 μs       -4.1%
marlowe/trustfund/trustfund-1               2.103 ms	   1.995 ms       -5.1%
marlowe/trustfund/trustfund-2               1.504 ms	   1.465 ms       -2.6%
marlowe/zerocoupon/zerocoupon-1             2.174 ms	   2.094 ms       -3.7%
marlowe/zerocoupon/zerocoupon-2             1.304 ms	   1.273 ms       -2.4%

@kwxm
Copy link
Contributor

kwxm commented Jul 2, 2021

I just want to have a look at the benchmark logs for this...

/benchmark

@kwxm kwxm mentioned this pull request Jul 2, 2021
11 tasks
@iohk-devops
Copy link

crowdfunding/crowdfunding-success-1 695.2 μs 628.5 μs -9.6%
crowdfunding/crowdfunding-success-2 695.2 μs 634.5 μs -8.7%
crowdfunding/crowdfunding-success-3 693.8 μs 637.2 μs -8.2%
currency/currency-1 625.3 μs 572.0 μs -8.5%
currency/currency-2 811.1 μs 783.7 μs -3.4%
escrow/escrow-redeem_1-1 968.7 μs 934.9 μs -3.5%
escrow/escrow-redeem_1-2 968.5 μs 935.3 μs -3.4%
escrow/escrow-redeem_2-1 1.109 ms 1.071 ms -3.4%
escrow/escrow-redeem_2-2 1.114 ms 1.070 ms -3.9%
escrow/escrow-redeem_2-3 1.113 ms 1.070 ms -3.9%
escrow/escrow-refund-1 481.0 μs 440.2 μs -8.5%
future/future-increase-margin-1 629.7 μs 567.5 μs -9.9%
future/future-increase-margin-2 813.2 μs 777.1 μs -4.4%
future/future-increase-margin-3 1.401 ms 1.350 ms -3.6%
future/future-increase-margin-4 1.402 ms 1.352 ms -3.6%
future/future-increase-margin-5 1.306 ms 1.250 ms -4.3%
future/future-increase-margin-6 1.932 ms 1.729 ms -10.5%
future/future-pay-out-1 627.4 μs 565.0 μs -9.9%
future/future-pay-out-2 808.9 μs 778.6 μs -3.7%
future/future-pay-out-3 1.400 ms 1.351 ms -3.5%
future/future-pay-out-4 1.402 ms 1.360 ms -3.0%
future/future-pay-out-5 1.824 ms 1.736 ms -4.8%
future/future-settle-early-1 632.0 μs 570.7 μs -9.7%
future/future-settle-early-2 814.4 μs 781.8 μs -4.0%
future/future-settle-early-3 1.407 ms 1.362 ms -3.2%
future/future-settle-early-4 1.406 ms 1.360 ms -3.3%
future/future-settle-early-5 1.437 ms 1.384 ms -3.7%
game-sm/game-sm-success-1 1.004 ms 968.8 μs -3.5%
game-sm/game-sm-success-2 537.1 μs 586.1 μs +9.1%
game-sm/game-sm-success-3 1.443 ms 1.409 ms -2.4%
game-sm/game-sm-success-4 749.4 μs 702.2 μs -6.3%
game-sm/game-sm-success_2-1 1.002 ms 970.9 μs -3.1%
game-sm/game-sm-success_2-2 541.0 μs 585.7 μs +8.3%
game-sm/game-sm-success_2-3 1.452 ms 1.404 ms -3.3%
game-sm/game-sm-success_2-4 749.0 μs 700.9 μs -6.4%
game-sm/game-sm-success_2-5 1.463 ms 1.379 ms -5.7%
game-sm/game-sm-success_2-6 747.7 μs 695.7 μs -7.0%
multisig-sm/multisig-sm-01 1.057 ms 1.028 ms -2.7%
multisig-sm/multisig-sm-02 1.069 ms 1.033 ms -3.4%
multisig-sm/multisig-sm-03 1.090 ms 1.052 ms -3.5%
multisig-sm/multisig-sm-04 1.106 ms 1.063 ms -3.9%
multisig-sm/multisig-sm-05 1.305 ms 1.259 ms -3.5%
multisig-sm/multisig-sm-06 1.165 ms 1.034 ms -11.2%
multisig-sm/multisig-sm-07 1.074 ms 1.032 ms -3.9%
multisig-sm/multisig-sm-08 1.092 ms 1.140 ms +4.4%
multisig-sm/multisig-sm-09 1.108 ms 1.062 ms -4.2%
multisig-sm/multisig-sm-10 1.304 ms 1.260 ms -3.4%
ping-pong/ping-pong-1 833.0 μs 772.2 μs -7.3%
ping-pong/ping-pong-2 832.7 μs 771.6 μs -7.3%
ping-pong/ping-pong_2-1 529.1 μs 477.6 μs -9.7%
prism/prism-1 498.8 μs 456.8 μs -8.4%
prism/prism-2 1.088 ms 1.036 ms -4.8%
prism/prism-3 985.1 μs 950.0 μs -3.6%
pubkey/pubkey-1 440.2 μs 402.6 μs -8.5%
stablecoin/stablecoin_1-1 2.093 ms 2.047 ms -2.2%
stablecoin/stablecoin_1-2 631.8 μs 577.3 μs -8.6%
stablecoin/stablecoin_1-3 2.361 ms 2.313 ms -2.0%
stablecoin/stablecoin_1-4 689.7 μs 631.2 μs -8.5%
stablecoin/stablecoin_1-5 2.892 ms 2.948 ms +1.9%
stablecoin/stablecoin_1-6 721.9 μs 807.8 μs +11.9%
stablecoin/stablecoin_2-1 2.101 ms 2.046 ms -2.6%
stablecoin/stablecoin_2-2 635.1 μs 577.9 μs -9.0%
stablecoin/stablecoin_2-3 2.371 ms 2.320 ms -2.2%
stablecoin/stablecoin_2-4 689.3 μs 627.4 μs -9.0%
token-account/token-account-1 596.3 μs 541.2 μs -9.2%
token-account/token-account-2 696.0 μs 637.7 μs -8.4%
token-account/token-account-3 884.0 μs 849.7 μs -3.9%
uniswap/uniswap-1 696.4 μs 629.9 μs -9.5%
uniswap/uniswap-2 1.110 ms 1.078 ms -2.9%
uniswap/uniswap-3 754.7 μs 702.1 μs -7.0%
uniswap/uniswap-4 827.4 μs 800.5 μs -3.3%
uniswap/uniswap-5 3.878 ms 3.784 ms -2.4%
uniswap/uniswap-6 1.124 ms 1.080 ms -3.9%
uniswap/uniswap-7 2.787 ms 2.725 ms -2.2%
uniswap/uniswap-8 1.074 ms 1.022 ms -4.8%
vesting/vesting-1 903.2 μs 869.2 μs -3.8%
marlowe/trustfund/trustfund-1 2.113 ms 2.011 ms -4.8%
marlowe/trustfund/trustfund-2 1.509 ms 1.472 ms -2.5%
marlowe/zerocoupon/zerocoupon-1 2.189 ms 2.105 ms -3.8%
marlowe/zerocoupon/zerocoupon-2 1.311 ms 1.280 ms -2.4%

@michaelpj michaelpj added the EXPERIMENT Experiments that we probably don't want to merge label Nov 26, 2021
@kwxm
Copy link
Contributor

kwxm commented Nov 9, 2023

@michaelpj I'm going to close this as part of my campaign to get rid of zombie PRs. This one's been open since June 2021and it says "This branch has conflicts that must be resolved". Yeah, I bet it does.

Oh, it also says "Some checks haven’t completed yet"!

@kwxm kwxm closed this Nov 9, 2023
@kwxm kwxm deleted the mpj/term-for-eval branch November 10, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EXPERIMENT Experiments that we probably don't want to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants