Skip to content

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
This improves instance generation time by another ~10% in the existing
benchmarks and prevents exponential blowup in constructors with many arguments.
Copy link
Collaborator

@omelkonian omelkonian left a comment

Choose a reason for hiding this comment

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

Fantastic!

@omelkonian omelkonian merged commit 149d25f into master Jul 15, 2025
1 check passed
@omelkonian omelkonian deleted the andre/derive-deceq-performance branch July 15, 2025 10: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.

3 participants