-
Notifications
You must be signed in to change notification settings - Fork 114
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
Please, make the statement "Monoid is not []" true #880
Comments
|
The codebase got refactored. It maximally uses polymorphic It is now should be easier to convert |
Use |
Added a Encouraging. |
Talked with Nikita (the Also because of the published benchmarks he updated |
One of the core stones HNix stumbles on is pretty pervasive String (as exceptions that gather provenance info, and in REPL) and, especially, List being used across the whole project.
The List is famously a one-directionally linked chain structure.
That means that per every cell used there is a cell that holds a pointer.
And there is no way to append to list without traverse of the whole list.
Appending
x
meaning traverse every time, which is doingx^2
actions, so indeed - exponential append.The most frequent thing the structure builder does is appending.
So, lets look at what actions happen with the Monoid, and most probably replace the List with an efficient Monoid, for example: https://hackage.haskell.org/package/acc
The text was updated successfully, but these errors were encountered: