Replies: 1 comment
-
I experimentally converted this issue to a discussion. I haven't used github discussions before, btw. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For fun internally we wrote a nom parser (on a private repo, but it's nothing secret, just on our work gitlab) for a vector of integers, and I wrote one in flatparse. I put the numbers here: https://gist.github.com/chrisdone/8551675bb99a0d66cf075fdcb1e6b757 Flatparse performs better than nom in this case.
I was confused about why my code doing a
V.fromList
could be fast and was considering rewriting it with a double-growing vector, but looking at the core I found it already does that. ForsepBy
, GHC identified join points and merged the parser with a mutable vector writing loop. I normally don't trust fusion or clever GHC optimizations (because you can make small changes and suddenly your code is 2x slower), but in this case it's very beneficial. I was worried I'd need to stick aState# s
in flatparse to have ST around or something painful.Could you open the Discussion on this project for a place to chat about ideas and sharing reports? The issue tracker feels like the wrong place.
Beta Was this translation helpful? Give feedback.
All reactions