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 std.contract.Equal using %record/split_pair% #1988

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

yannham
Copy link
Member

@yannham yannham commented Jul 4, 2024

The std.contract.Equal contract needs to be lazy, which means that it re-implements equality logic in pure Nickel code, which has proven to be very slow (#1930).

This commit replaces the field difference operation, implemented using a left fold, by the new builtin operator %record/split_pair%, which shows a performance improvement of around 300% for the example of #1930.

The std.contract.Equal contract needs to be lazy, which means that it
re-implement equality logic in pure Nickel code, which has proven to be
very slow (#1930).

This commit replaces the field difference operation, implemented using a
left fold, by the new builtin operator `%record/split_pair%`, which
shows a performance improvement of around 300% for the example of #1930.
@yannham yannham requested review from jneem and vkleen July 4, 2024 11:52
@github-actions github-actions bot temporarily deployed to pull request July 4, 2024 11:55 Inactive
@yannham yannham added this pull request to the merge queue Jul 8, 2024
Merged via the queue into master with commit 3750621 Jul 8, 2024
5 checks passed
@yannham yannham deleted the optimization/std-contract-equal branch July 8, 2024 08:40
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.

2 participants