-
Notifications
You must be signed in to change notification settings - Fork 139
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
Foldable instance for Vector uses slow default implementations for many methods #112
Comments
Please go ahead, this is clearly an optimazation which won't break any API, who is the maintainer now? Please make a judgement ; ) |
I'd love to know answer to this question. |
The core libraries committee is the official maintainer, and they delegate mostly to me. If someone wants to implement this, it sounds like a good idea to me. |
Well judging by number of open pull requests and commit history there isn't enough manpower to maintain vector properly. |
could someone roll a wee benchmark to validate switching Data.Vector and suchlike to this? Relatedly: I presume we can only provide a Foldable instance for boxed vectors right? |
I implemented this. And yes, it's only for boxed vectors ( |
The current definition is
The problem with this is that there are many other
Foldable
operations that have Vector versions which are much faster than the default implementations. Sometimes Vector even offers an asymptotically superior version, such aslength
, which has anO(n)
default implementation, whereas Vector has aO(1)
operation for this.I would open a PR, but was dissuaded by the pile of existing ones.
The text was updated successfully, but these errors were encountered: