-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
Design-PatternsSomething related to the Design Patterns folder in this repoSomething related to the Design Patterns folder in this repoenhancementNew feature or requestNew feature or request
Description
I think this should go in its own Appendix. Or perhaps be a new folder?
It would be nice if a guide was written that explained various tips/tricks for maximizing performance when it's needed most. A few examples that immediately come to mind:
Reduce the number of traversals where possible
For example, map f <<< map g
(2 traversals) should become map (f <<< g)
(1 traversal). This tends to sneak in when some code is using foldl
/foldr
implicitly.
Split multi-case statements into optimized trees
For example, the below code will be highly readable, but comes at a performance cost.
foo = case _, _, _ of
....
This code is more performant due to resulting JS code that gets generated.
foo a b c = case a of
... -> case b of
... -> case c of
... -> ...
Metadata
Metadata
Assignees
Labels
Design-PatternsSomething related to the Design Patterns folder in this repoSomething related to the Design Patterns folder in this repoenhancementNew feature or requestNew feature or request