Skip to content

Improve performance of DecEq deriving #34

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

Conversation

WhatisRT
Copy link
Collaborator

@WhatisRT WhatisRT commented Jul 9, 2025

I see ~47% speedup in instance generation time (typechecking) and ~22% speedup at runtime (normalization) with admittedly flaky benchmarks. Crucially, the generated instances should now only ever force booleans during normalization if all we want to know is the boolean equality.

Since this is probably the single most used feature provided by this library, I invite everyone to test if all instances still generate correctly and that there are no performance regressions.

(Also, I realized just now that apparently #33 got merged before I did my improvements to it, so the commits are now in this PR. I don't mind having them tangled so I'll keep it like that for now, but I'll put them in a separate PR if desired).

@WhatisRT WhatisRT requested a review from omelkonian July 9, 2025 15:25
@WhatisRT WhatisRT force-pushed the andre/derive-deceq-performance branch from ea5f4a2 to 7a2cfc3 Compare July 9, 2025 15:33
WhatisRT added 2 commits July 10, 2025 10:56
I see ~47% speedup in instance generation time (typechecking) and ~22%
speedup at runtime (normalization) with admittedly flaky benchmarks.

Crucially, the generated instances should now only ever force booleans
during normalization if all we want to know is the boolean equality.
@WhatisRT WhatisRT force-pushed the andre/derive-deceq-performance branch from 7a2cfc3 to d459f65 Compare July 10, 2025 08:56
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.

1 participant