Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add ScriptContext test #6959

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

Add ScriptContext test #6959

wants to merge 25 commits into from

Conversation

ana-pantilie
Copy link
Contributor

@ana-pantilie ana-pantilie commented Mar 17, 2025

Fixes https://github.com/IntersectMBO/plutus-private/issues/1479

The AsData version is actually slightly better (in script size) than the manually optimised version! I am not entirely sure why, since I tried multiple versions of the manually optimised one, and this was the best one.

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand why Data-backed Marlowe is slightly faster now. The only relationship I can think of is that maybe it uses code from this module and adding these two extensions somehow made the compiler generate code which is slightly more optimal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After talking to @zliu41, and seeing that other tests have also been impacted, it's most likely from the two member' and insert' functions being exported, but it remains to be seen what exactly is going on with the Haskell Core. Anyway, we're lucky that the performance changes work in our favor.

@ana-pantilie ana-pantilie marked this pull request as ready for review March 24, 2025 13:56
@ana-pantilie ana-pantilie requested review from zliu41 and a team March 24, 2025 13:56
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant