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

Remove SN GADT in favour of inlinable functions #348

Merged
merged 7 commits into from
Nov 29, 2024
Merged

Conversation

turion
Copy link
Owner

@turion turion commented Aug 13, 2024

@AndrasKovacs suggested a great performance improvement that would allow more inlining. Instead of a recursive SN type that is erased at runtime, I can "functionalize" signal networks by encoding them directly in their semantic domain. Together with #323, this results in massive speedups.

@turion turion mentioned this pull request Aug 13, 2024
5 tasks
@turion
Copy link
Owner Author

turion commented Aug 13, 2024

In fact #323 isn't even needed for some of the speedups, it turns out. The simple rhine sum benchmark shows a >200x speedup with this change.

rhine/src/FRP/Rhine/Reactimation/ClockErasure.hs Outdated Show resolved Hide resolved
rhine/src/FRP/Rhine/Reactimation/ClockErasure.hs Outdated Show resolved Hide resolved
rhine/src/FRP/Rhine/Reactimation/ClockErasure.hs Outdated Show resolved Hide resolved
rhine/src/FRP/Rhine/SN/Combinators.hs Show resolved Hide resolved
@turion turion enabled auto-merge November 29, 2024 14:58
@turion turion merged commit 09969fe into master Nov 29, 2024
17 checks passed
@turion turion deleted the dev_sn_functions branch November 29, 2024 15:20
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