Skip to content

Strictify maps#103

Merged
treeowl merged 2 commits intolspitzner:masterfrom
treeowl:strictify-maps
Apr 8, 2023
Merged

Strictify maps#103
treeowl merged 2 commits intolspitzner:masterfrom
treeowl:strictify-maps

Conversation

@treeowl
Copy link
Copy Markdown
Collaborator

@treeowl treeowl commented Apr 3, 2023

  • Make mapping force spines.
  • Deprecate seqSpine. It shouldn't be needed any more.

Closes #100

@treeowl treeowl requested a review from konsumlamm April 3, 2023 19:54
@treeowl treeowl force-pushed the strictify-maps branch 4 times, most recently from 4805c0a to 92757de Compare April 3, 2023 21:14
@konsumlamm
Copy link
Copy Markdown
Collaborator

Are you sure those are all mapping functions that need modification? What about Data.PQueue.Prio.Internals.mapForest (although it seems that one isn't even used anywhere) and Data.PQueue.Min.keysF?

treeowl added 2 commits April 8, 2023 00:15
Very little can actually be done to a queue without (potentially)
forcing its whole spine. So leaving spines lazy for mapping and
traversing gains very little performance in practice and makes
performance less predictable.

Closes lspitzner#100
Now that maps and unordered traversals force the result spines,
`seqSpine` is no longer useful.
@treeowl
Copy link
Copy Markdown
Collaborator Author

treeowl commented Apr 8, 2023

Are you sure those are all mapping functions that need modification? What about Data.PQueue.Prio.Internals.mapForest (although it seems that one isn't even used anywhere) and Data.PQueue.Min.keysF?

Good catches. I just fixed those.

@treeowl treeowl merged commit b648c0f into lspitzner:master Apr 8, 2023
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.

Make mapU/mapMonotonic and Prio.mapKeysMonotonic spine-strict

2 participants