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

Optimize some PIsList utilities - add a few more utilities #87

Merged
merged 12 commits into from
Jan 13, 2022
Merged

Conversation

TotallyNotChase
Copy link
Collaborator

@TotallyNotChase TotallyNotChase commented Jan 11, 2022

  • Add some missing phoistAcyclics to top level utilities.

  • Remove redundant plet usage from plength.

  • Make plistEquals manually go through both lists at once (using pelimList). This should be significantly more efficient than zipWith followed by foldr.

    It looks like the entire result of zipWith is evaluated before foldr is called.

  • Make pall use precList directly.

  • Add pany.

  • Add pfoldrLazy. This takes in a (a :--> PDelayed b :--> b), rather than (a :--> b :--> b) - allowing the fold to short circuit.

  • Add left folds, pfoldl and pfoldl'.

  • Add some tests for pfoldl.

Closes #79

@TotallyNotChase TotallyNotChase changed the title Optimize some PList utilities - add a few more utilities Optimize some PIsList utilities - add a few more utilities Jan 12, 2022
Plutarch/List.hs Outdated Show resolved Hide resolved
@L-as
Copy link
Member

L-as commented Jan 13, 2022

Can we put this into staging to reduce merge conflicts later on?

Copy link
Member

@L-as L-as left a comment

Choose a reason for hiding this comment

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

LGTM

@L-as
Copy link
Member

L-as commented Jan 13, 2022

If only we were using Pijul.

@TotallyNotChase TotallyNotChase changed the base branch from master to staging January 13, 2022 12:28
@TotallyNotChase
Copy link
Collaborator Author

Can we put this into staging to reduce merge conflicts later on?

Done!

@L-as L-as merged commit e089b1d into staging Jan 13, 2022
@srid srid mentioned this pull request Jan 17, 2022
@L-as L-as deleted the plist-opti branch January 17, 2022 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Benchmark list utilities and alter if needed
2 participants