Skip to content

[Builtin] Add "dumb" Data matching #7209

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

[Builtin] Add "dumb" Data matching #7209

wants to merge 3 commits into from

Conversation

SeungheonOh
Copy link
Collaborator

@SeungheonOh SeungheonOh commented Jul 14, 2025

part of #6602

Here we don't do any elaborate casing on Constr constructor of Data; instead, it will simply case on each constructors of Data. This might not be useful since this style of casing isn't used frequently in real-world script.

Feel free to close this PR, once we have smarter/more useful casing on Constr.

Copy link
Contributor

github-actions bot commented Jul 14, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://IntersectMBO.github.io/plutus/pr-preview/pr-7209/

Built to branch gh-pages at 2025-07-14 19:38 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@SeungheonOh
Copy link
Collaborator Author

/benchmark lists

Copy link
Contributor

Click here to check the status of your benchmark.

@SeungheonOh SeungheonOh added the No Changelog Required Add this to skip the Changelog Check label Jul 14, 2025
Copy link
Contributor

Comparing benchmark results of 'lists' on '65c6e4d795' (base) and '5aa6ceb229' (PR)

Results table
Script 65c6e4d 5aa6ceb Change
sort/ghcSort/50 134.4 μs 133.2 μs -0.9%
sort/ghcSort/100 312.3 μs 308.5 μs -1.2%
sort/ghcSort/150 533.1 μs 530.9 μs -0.4%
sort/ghcSort/200 720.7 μs 713.0 μs -1.1%
sort/ghcSort/250 934.7 μs 926.7 μs -0.9%
sort/ghcSort/300 1.224 ms 1.213 ms -0.9%
sort/insertionSort/50 436.0 μs 424.7 μs -2.6%
sort/insertionSort/100 1.748 ms 1.691 ms -3.3%
sort/insertionSort/150 3.917 ms 3.809 ms -2.8%
sort/insertionSort/200 7.030 ms 6.782 ms -3.5%
sort/insertionSort/250 11.01 ms 10.65 ms -3.3%
sort/insertionSort/300 15.89 ms 15.46 ms -2.7%
sort/mergeSort/50 429.7 μs 426.4 μs -0.8%
sort/mergeSort/100 987.0 μs 984.0 μs -0.3%
sort/mergeSort/150 1.590 ms 1.582 ms -0.5%
sort/mergeSort/200 2.232 ms 2.232 ms 0.0%
sort/mergeSort/250 2.931 ms 2.928 ms -0.1%
sort/mergeSort/300 3.572 ms 3.560 ms -0.3%
sort/quickSort/50 1.046 ms 1.040 ms -0.6%
sort/quickSort/100 4.408 ms 4.403 ms -0.1%
sort/quickSort/150 9.933 ms 9.928 ms -0.1%
sort/quickSort/200 17.67 ms 17.59 ms -0.5%
sort/quickSort/250 27.81 ms 27.81 ms 0.0%
sort/quickSort/300 40.29 ms 40.21 ms -0.2%
sum/compiled-from-Haskell/sum-right-builtin/100 43.90 μs 44.15 μs +0.6%
sum/compiled-from-Haskell/sum-right-builtin/500 232.3 μs 231.8 μs -0.2%
sum/compiled-from-Haskell/sum-right-builtin/1000 499.2 μs 499.8 μs +0.1%
sum/compiled-from-Haskell/sum-right-builtin/2500 1.652 ms 1.656 ms +0.2%
sum/compiled-from-Haskell/sum-right-builtin/5000 3.886 ms 3.917 ms +0.8%
sum/compiled-from-Haskell/sum-right-Scott/100 43.30 μs 43.30 μs 0.0%
sum/compiled-from-Haskell/sum-right-Scott/500 231.7 μs 230.7 μs -0.4%
sum/compiled-from-Haskell/sum-right-Scott/1000 509.4 μs 506.9 μs -0.5%
sum/compiled-from-Haskell/sum-right-Scott/2500 1.805 ms 1.809 ms +0.2%
sum/compiled-from-Haskell/sum-right-Scott/5000 4.190 ms 4.190 ms 0.0%
sum/compiled-from-Haskell/sum-right-data/100 187.6 μs 121.9 μs -35.0%
sum/compiled-from-Haskell/sum-right-data/500 1.066 ms 661.8 μs -37.9%
sum/compiled-from-Haskell/sum-right-data/1000 2.485 ms 1.537 ms -38.1%
sum/compiled-from-Haskell/sum-right-data/2500 6.762 ms 4.658 ms -31.1%
sum/compiled-from-Haskell/sum-right-data/5000 14.38 ms 10.23 ms -28.9%
sum/compiled-from-Haskell/sum-left-builtin/100 43.57 μs 43.90 μs +0.8%
sum/compiled-from-Haskell/sum-left-builtin/500 231.6 μs 232.5 μs +0.4%
sum/compiled-from-Haskell/sum-left-builtin/1000 495.5 μs 499.9 μs +0.9%
sum/compiled-from-Haskell/sum-left-builtin/2500 1.599 ms 1.604 ms +0.3%
sum/compiled-from-Haskell/sum-left-builtin/5000 3.840 ms 3.857 ms +0.4%
sum/compiled-from-Haskell/sum-left-Scott/100 42.97 μs 42.34 μs -1.5%
sum/compiled-from-Haskell/sum-left-Scott/500 232.9 μs 229.8 μs -1.3%
sum/compiled-from-Haskell/sum-left-Scott/1000 511.6 μs 502.9 μs -1.7%
sum/compiled-from-Haskell/sum-left-Scott/2500 1.765 ms 1.747 ms -1.0%
sum/compiled-from-Haskell/sum-left-Scott/5000 4.139 ms 4.118 ms -0.5%
sum/compiled-from-Haskell/sum-left-data/100 197.2 μs 125.5 μs -36.4%
sum/compiled-from-Haskell/sum-left-data/500 1.055 ms 669.5 μs -36.5%
sum/compiled-from-Haskell/sum-left-data/1000 2.516 ms 1.521 ms -39.5%
sum/compiled-from-Haskell/sum-left-data/2500 6.870 ms 4.710 ms -31.4%
sum/compiled-from-Haskell/sum-left-data/5000 15.07 ms 10.16 ms -32.6%
sum/hand-written-PLC/sum-right-builtin/100 78.35 μs 77.39 μs -1.2%
sum/hand-written-PLC/sum-right-builtin/500 404.2 μs 397.9 μs -1.6%
sum/hand-written-PLC/sum-right-builtin/1000 839.7 μs 826.5 μs -1.6%
sum/hand-written-PLC/sum-right-builtin/2500 2.374 ms 2.340 ms -1.4%
sum/hand-written-PLC/sum-right-builtin/5000 4.980 ms 4.903 ms -1.5%
sum/hand-written-PLC/sum-right-Scott/100 35.65 μs 36.10 μs +1.3%
sum/hand-written-PLC/sum-right-Scott/500 193.8 μs 196.0 μs +1.1%
sum/hand-written-PLC/sum-right-Scott/1000 410.0 μs 420.5 μs +2.6%
sum/hand-written-PLC/sum-right-Scott/2500 1.547 ms 1.573 ms +1.7%
sum/hand-written-PLC/sum-right-Scott/5000 4.384 ms 4.464 ms +1.8%
sum/hand-written-PLC/sum-left-builtin/100 81.28 μs 80.36 μs -1.1%
sum/hand-written-PLC/sum-left-builtin/500 388.0 μs 386.2 μs -0.5%
sum/hand-written-PLC/sum-left-builtin/1000 766.4 μs 761.8 μs -0.6%
sum/hand-written-PLC/sum-left-builtin/2500 2.009 ms 1.903 ms -5.3%
sum/hand-written-PLC/sum-left-builtin/5000 3.932 ms 3.759 ms -4.4%
sum/hand-written-PLC/sum-left-Scott/100 39.62 μs 39.76 μs +0.4%
sum/hand-written-PLC/sum-left-Scott/500 213.5 μs 217.3 μs +1.8%
sum/hand-written-PLC/sum-left-Scott/1000 481.3 μs 486.7 μs +1.1%
sum/hand-written-PLC/sum-left-Scott/2500 1.775 ms 1.792 ms +1.0%
sum/hand-written-PLC/sum-left-Scott/5000 4.531 ms 4.574 ms +0.9%
65c6e4d 5aa6ceb Change
TOTAL 262.8 ms 245.0 ms -6.8%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Don't look here yet No Changelog Required Add this to skip the Changelog Check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant