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

Reconsider extraction method #105

Closed
treeowl opened this issue Apr 18, 2023 · 1 comment
Closed

Reconsider extraction method #105

treeowl opened this issue Apr 18, 2023 · 1 comment

Comments

@treeowl
Copy link
Collaborator

treeowl commented Apr 18, 2023

Currently, we build various thunks when extracting. Some of these are definitely unnecessary (suspending the work of incrementing a forest that starts with Skip). Can we always force the increments to WHNF without risking a somewhat expensive cascade? I haven't done a proper analysis. Is such a cascade even bad enough to be worth avoiding? That should probably be checked with benchmarks.

Additionally: we use a (boxed) sum type as an intermediate result. Can we switch that to an unboxed one without performance trouble? Or might it be better to make two passes: one to locate the minimum and one to remove it?

I was pretty conservative when I made everything just strict enough to avoid thunk chains and their associated bad worst-case performance, but it's worth seeing if we can tighten things up further.

@treeowl
Copy link
Collaborator Author

treeowl commented Apr 28, 2023

Fixed in #107.

@treeowl treeowl closed this as completed Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants