Skip to content

Commit

Permalink
[Builtins] Make all builtins strict (#6523)
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully authored Nov 19, 2024
1 parent 223cca3 commit 28820ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plutus-core/plutus-core/src/PlutusCore/Builtin/Meaning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ instance
-- exception at any stage, that would be a bug regardless.
toMonoF @val @args @res $! do
(f, exF) <- getBoth
x <- readKnown arg
-- Force the argument that gets passed to the denotation. This seems to help performance
-- a bit (possibly due to its impact on strictness analysis), plus this way we ensure
-- that if computing the argument throws an exception (isn't supposed to happen), we'll
-- catch it in tests.
!x <- readKnown arg
-- See Note [Strict application in runtime denotations].
let !exY = exF x
pure (f x, exY)
Expand Down

1 comment on commit 28820ec

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 28820ec Previous: 223cca3 Ratio
validation-auction_1-1 254.3 μs 195.7 μs 1.30
validation-auction_2-3 1192 μs 1000.9999999999999 μs 1.19
validation-auction_2-4 898.4 μs 751 μs 1.20
validation-multisig-sm-4 433.6 μs 409.9 μs 1.06
validation-ping-pong-2 389.5 μs 339.4 μs 1.15
validation-ping-pong_2-1 284.4 μs 207.1 μs 1.37
validation-prism-1 242.3 μs 175.6 μs 1.38
validation-prism-2 587 μs 428.7 μs 1.37
validation-prism-3 530.8 μs 384.2 μs 1.38
validation-pubkey-1 201.9 μs 146.8 μs 1.38
validation-stablecoin_1-1 1277 μs 937.4 μs 1.36
validation-stablecoin_1-2 280.4 μs 203.9 μs 1.38
validation-stablecoin_1-3 1486 μs 1082 μs 1.37
validation-stablecoin_1-4 298.8 μs 216.4 μs 1.38
validation-stablecoin_1-5 1899 μs 1393 μs 1.36
validation-decode-auction_1-4 243.5 μs 217.6 μs 1.12
validation-decode-auction_2-1 275 μs 242.8 μs 1.13
validation-decode-future-settle-early-2 346.3 μs 320.1 μs 1.08
validation-decode-token-account-2 218.6 μs 208 μs 1.05
nofib-clausify/formula1 4026 μs 3196 μs 1.26
nofib-clausify/formula2 5779 μs 4263 μs 1.36
nofib-clausify/formula3 15810 μs 14040 μs 1.13
marlowe-semantics/0101010001010101010101000100010100000001010000010001000001000101 1062 μs 997.8 μs 1.06
marlowe-semantics/0101020201010201010200010102000201000201010102000102010201010000 453.6 μs 336.8 μs 1.35
marlowe-semantics/0101080808040600020306010000000302050807010208060100070207080202 1065 μs 842.5 μs 1.26
marlowe-semantics/119fbea4164e2bf21d2b53aa6c2c4e79414fe55e4096f5ce2e804735a7fbaf91 959.8 μs 838.5 μs 1.14
marlowe-semantics/12910f24d994d451ff379b12c9d1ecdb9239c9b87e5d7bea570087ec506935d5 745.3 μs 554.7 μs 1.34
marlowe-semantics/18cefc240debc0fcab14efdd451adfd02793093efe7bc76d6322aed6ddb582ad 1122 μs 827.8 μs 1.36
marlowe-semantics/1a2f2540121f09321216090b2b1f211e3f020c2c133a1a3c3f3c232a26153a04 452.4 μs 336.6 μs 1.34
marlowe-semantics/1a573aed5c46d637919ccb5548dfc22a55c9fc38298d567d15ee9f2eea69d89e 1343 μs 992.4 μs 1.35
marlowe-semantics/66af9e473d75e3f464971f6879cc0f2ef84bafcb38fbfa1dbc31ac2053628a38 1459 μs 1372 μs 1.06
marlowe-semantics/675d63836cad11b547d1b4cddd498f04c919d4342612accf40913f9ae9419fac 1544 μs 1139 μs 1.36
marlowe-semantics/67ba5a9a0245ee3aff4f34852b9889b8c810fccd3dce2a23910bddd35c503b71 8117.000000000001 μs 6033 μs 1.35
marlowe-semantics/6d88f7294dd2b5ce02c3dc609bc7715bd508009738401d264bf9b3eb7c6f49c1 732.4 μs 545.8 μs 1.34
marlowe-semantics/70f65b21b77ddb451f3df9d9fb403ced3d10e1e953867cc4900cc25e5b9dec47 1180 μs 869.1 μs 1.36
marlowe-semantics/71965c9ccae31f1ffc1d85aa20a356d4ed97a420954018d8301ec4f9783be0d7 715.4 μs 529.6 μs 1.35
marlowe-semantics/74c67f2f182b9a0a66c62b95d6fac5ace3f7e71ea3abfc52ffbe3ecb93436ea2 1184 μs 875.3 μs 1.35
marlowe-semantics/7529b206a78becb793da74b78c04d9d33a2540a1abd79718e681228f4057403a 1188 μs 878.4 μs 1.35
marlowe-semantics/75a8bb183688bce447e00f435a144c835435e40a5defc6f3b9be68b70b4a3db6 1037 μs 765.3 μs 1.36
marlowe-semantics/7a758e17486d1a30462c32a5d5309bd1e98322a9dcbe277c143ed3aede9d265f 770 μs 570.5 μs 1.35
marlowe-semantics/7cbc5644b745f4ea635aca42cce5e4a4b9d2e61afdb3ac18128e1688c07071ba 709.7 μs 524.1 μs 1.35
marlowe-semantics/82213dfdb6a812b40446438767c61a388d2c0cfd0cbf7fd4a372b0dc59fa17e1 1935 μs 1416 μs 1.37
marlowe-semantics/8c7fdc3da6822b5112074380003524f50fb3a1ce6db4e501df1086773c6c0201 1709 μs 1265 μs 1.35
marlowe-semantics/9fabc4fc3440cdb776b28c9bb1dd49c9a5b1605fe1490aa3f4f64a3fa8881b25 1577 μs 1237 μs 1.27
marlowe-semantics/a85173a832db3ea944fafc406dfe3fa3235254897d6d1d0e21bc380147687bd5 560 μs 398.5 μs 1.41
marlowe-semantics/a9a853b6d083551f4ed2995551af287880ef42aee239a2d9bc5314d127cce592 769.9 μs 552.6 μs 1.39
marlowe-semantics/acb9c83c2b78dabef8674319ad69ba54912cd9997bdf2d8b2998c6bfeef3b122 971.9 μs 711.5 μs 1.37
marlowe-semantics/acce04815e8fd51be93322888250060da173eccf3df3a605bd6bc6a456cde871 433.3 μs 317.4 μs 1.37
marlowe-semantics/f339f59bdf92495ed2b14e2e4d3705972b4dda59aa929cffe0f1ff5355db8d79 6558 μs 5540 μs 1.18
marlowe-semantics/ffdd68a33afd86f8844c9f5e45b2bda5b035aa02274161b23d57709c0f8b8de6 1415 μs 1012 μs 1.40
marlowe-role-payout/0004000402010401030101030100040000010104020201030001000204020401 286.6 μs 203.9 μs 1.41
marlowe-role-payout/0100000100010000000001000100010101000101000001000000010000010000 392.3 μs 281.5 μs 1.39
marlowe-role-payout/0101000100000101010000010101000100010101000001000001000000010101 305.8 μs 217.5 μs 1.41
marlowe-role-payout/01dcc372ea619cb9f23c45b17b9a0a8a16b7ca0e04093ef8ecce291667a99a4c 252 μs 181 μs 1.39
marlowe-role-payout/0201020201020000020000010201020001020200000002010200000101010100 280.2 μs 199.1 μs 1.41
marlowe-role-payout/0202010002010100020102020102020001010101020102010001010101000100 262.4 μs 187.3 μs 1.40
marlowe-role-payout/0303020000020001010201060303040208070100050401080304020801030001 264.1 μs 189 μs 1.40
marlowe-role-payout/031d56d71454e2c4216ffaa275c4a8b3eb631109559d0e56f44ea8489f57ba97 318.3 μs 227.5 μs 1.40
marlowe-role-payout/0dbb692d2bf22d25eeceac461cfebf616f54003077a8473abc0457f18e025960 312.3 μs 284.9 μs 1.10
marlowe-role-payout/0e00171d0f1e1f14070d0a00091f07101808021d081e1b120219081312081e15 260.2 μs 192.6 μs 1.35
marlowe-role-payout/0e72f62b0f922e31a2340baccc768104025400cf7fdd7dae62fbba5fc770936d 293.7 μs 216.2 μs 1.36
marlowe-role-payout/0e97c9d9417354d9460f2eb35018d3904b7b035af16ab299258adab93be0911a 286 μs 211.4 μs 1.35
marlowe-role-payout/0f010d040810040b10020e040f0e030b0a0d100f0c080c0c05000d04100c100f 299.4 μs 219.7 μs 1.36
marlowe-role-payout/1138a04a83edc0579053f9ffa9394b41df38230121fbecebee8c039776a88c0c 262.8 μs 192.9 μs 1.36
marlowe-role-payout/121a0a1b12030616111f02121a0e070716090a0e031c071419121f141409031d 256.2 μs 204.4 μs 1.25
marlowe-role-payout/195f522b596360690d04586a2563470f2214163435331a6622311f7323433f1c 254.8 μs 187.2 μs 1.36
marlowe-role-payout/1a20b465d48a585ffd622bd8dc26a498a3c12f930ab4feab3a5064cfb3bc536a 284.3 μs 208.7 μs 1.36
marlowe-role-payout/211e1b6c10260c4620074d2e372c260d38643a3d605f63772524034f0a4a7632 273.1 μs 200.7 μs 1.36
marlowe-role-payout/21a1426fb3fb3019d5dc93f210152e90b0a6e740ef509b1cdd423395f010e0ca 288.3 μs 213.7 μs 1.35
marlowe-role-payout/224ce46046fab9a17be4197622825f45cc0c59a6bd1604405148e43768c487ef 263.4 μs 192 μs 1.37
marlowe-role-payout/332c2b1c11383d1b373e1315201f1128010e0e1518332f273f141b23243f2a07 249.5 μs 184.2 μs 1.35
marlowe-role-payout/3565ee025317e065e8555eef288080276716366769aad89e03389f5ec4ce26d7 274.2 μs 202.4 μs 1.35
marlowe-role-payout/3569299fc986f5354d02e627a9eaa48ab46d5af52722307a0af72bae87e256dc 259.6 μs 191.4 μs 1.36
marlowe-role-payout/36866914aa07cf62ef36cf2cd64c7f240e3371e27bb9fff5464301678e809c40 259.2 μs 191.4 μs 1.35
marlowe-role-payout/371c10d2526fc0f09dbe9ed59e44dcd949270b27dc42035addd7ff9f7e0d05e7 308.9 μs 228.5 μs 1.35
marlowe-role-payout/3897ef714bba3e6821495b706c75f8d64264c3fdaa58a3826c808b5a768c303d 266.3 μs 196.4 μs 1.36
marlowe-role-payout/4121d88f14387d33ac5e1329618068e3848445cdd66b29e5ba382be2e02a174a 306.1 μs 225.6 μs 1.36
marlowe-role-payout/4299c7fcf093a5dbfe114c188e32ca199b571a7c25cb7f766bf49f12dab308be 284.7 μs 211.5 μs 1.35
marlowe-role-payout/452e17d16222a427707fa83f63ffb79f606cc25c755a18b1e3274c964ed5ec99 316.7 μs 234 μs 1.35
marlowe-role-payout/46f8d00030436e4da490a86b331fa6c3251425fb8c19556080e124d75bad7bd6 259.4 μs 191.5 μs 1.35
marlowe-role-payout/47364cfaf2c00f7d633283dce6cf84e4fd4e8228c0a0aa50e7c55f35c3ecaa1c 260.1 μs 192.1 μs 1.35
marlowe-role-payout/49b8275d0cb817be40865694ab05e3cfe5fc35fb43b78e7de68c1f3519b536bd 270.8 μs 199.3 μs 1.36
marlowe-role-payout/4dd7755b6ca1f0c9747c1fc0ee4da799f6f1c07108e980bd9f820911ad711ff2 342.2 μs 251.1 μs 1.36
marlowe-role-payout/4fbcfdb577a56b842d6f6938187a783f71d9da7519353e3da3ef0c564e1eb344 317.3 μs 233.6 μs 1.36
marlowe-role-payout/5a0725d49c733130eda8bc6ed5234f7f6ff8c9dd2d201e8806125e5fbcc081f9 277.2 μs 203.9 μs 1.36
marlowe-role-payout/5a2aae344e569a2c644dd9fa8c7b1f129850937eb562b7748c275f9e40bed596 260 μs 191.9 μs 1.35
marlowe-role-payout/5ade103e9530dd0d572fe1b053ea65ad925c6ebbe321e873ace8b804363fa82c 363.6 μs 268.1 μs 1.36
marlowe-role-payout/5d4c62a0671c65a14f6a15093e3efc4f1816d95a5a58fd92486bedaae8d9526b 299.8 μs 220.9 μs 1.36
marlowe-role-payout/5efe992e306e31cc857c64a62436ad2f9325acc5b4a74a8cebccdfd853ce63d2 271.8 μs 200.1 μs 1.36
marlowe-role-payout/622a7f3bc611b5149253c9189da022a9ff296f60a5b7c172a6dc286faa7284fa 314.1 μs 232.8 μs 1.35
marlowe-role-payout/6621a69217f09d91f42876a9c0cecf79de0e29bdd5b16c82c6c52cf959092ec4 290.5 μs 214.6 μs 1.35
marlowe-role-payout/674b0577409957172ad85223c765d17e94c27714276c49c38dfae0a47a561a1e 254.4 μs 192.5 μs 1.32
marlowe-role-payout/6b7bc2b9002a71b33cfd535d43f26334a283d0b9ad189b7cd74baac232c3b9fc 251.8 μs 185.5 μs 1.36
marlowe-role-payout/6c364699767a84059ffd99cf718562a8c09d96e343f23dc481e8ffda13af424f 260 μs 191.9 μs 1.35
marlowe-role-payout/6d66bddb4269bdf77392d3894da5341cf019d39787522af4f83f01285991e93c 265.8 μs 197.3 μs 1.35

This comment was automatically generated by workflow using github-action-benchmark.

CC: @IntersectMBO/plutus-core

Please sign in to comment.