-
Notifications
You must be signed in to change notification settings - Fork 322
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
Rewrite aeson with binary-parsers #466
Comments
Would the new parser be as easily consumable in a streaming mode like |
Yes, definitely. Binary support streaming perfectly with |
@winterland1989 it |
Good idea, it occurred to me maybe
|
@winterland1989 Have you seen the store library? It is highly optimized. I would be very surprised to see any circumstances where binary-parsers is faster. |
Hi @mgsloan, I checked store just after its release : ) but i don't think store is up to the task here, for example how can i provide these combinators with store? IMHO, store is trying to make a better |
You could certainly provide those combinators by constructing a monad atop the |
Because i care for the performance as much as you do ; ) Whether or not to adopt my package is the whole point of this discussion, if you think it's a wrong thing to do, i'd like to hear more about what makes you think so. That been said, i don't think
|
For people looking for benchmarks, i've done this experiment in #467. Please review. |
I just hope all new dependencies will build with |
@tolysz: we will pull |
|
Then this should build. |
Cool, seems reasonable, @winterland1989 ! I think |
Well, i actually have some questions about safety of the |
Good point! I've opened mgsloan/store#76 about it. You only can do that if you import |
Thank you @winterland1989! Adding new dependencies is something we have always been careful about for several reasons such as stability of the libs apis, bus number, introduction of another possible point of failure... So please excuse my hesitation as my gut reaction is "maybe later". But I don't think I should make this decision by myself, I'd very much like to hear what others think about all of this. Cheers |
Yes, I fully understand this, that's why I am asking everyone here, please take your time to evaluate this change. |
Yes, Backpack would help. Just not immediately (since it's not released yet.) |
The |
EDIT: For people looking for benchmarks, i've done this experiment in #467. Please review.
Recently i release a parsing library based on binary, it's incredible fast which made me re-read binary's source code, which lead to several further optimizations later.
From the benchmark, performance are improved by 10~30% with new parser, and i would expect more improvement on aeson's master, since binary-parsers provide a new scan combinator which i haven't used in benchmark yet:
My plan is to using this combinator with a C version scan function to find string's double quote end.
But this whole thing will break compatibility badly since aeson expose attoparsec parsers through
Data.Aeson.Parser
module, so i'm asking you to make a judgement. Should i do this in aeson, or should i just roll a new package? I definitely don't want to split a package just for a new parser.The text was updated successfully, but these errors were encountered: