1BRC in Haskell: it's easy to get performance similar to 'wc'. #391
hugodro
started this conversation in
Show and tell
Replies: 1 comment
-
For those interested in a fairly thorough treatment of the challenge, there's a discussion on the Haskell discourse with more implementations |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Using the 1BRC to experiment with getting good performance out of Haskell normal code.
Conclusion: yes, Haskell code is performant almost out of the box. The trick is to take care of removing lazy evaluation where it's not useful.
I use the word-count utility wc as the benchmark for what is quick processing. In this case a 30 minute coding session resulted in a parser that runs 4-5x slower than wc, depending on the CPU/OS where the test is done.
The code is in: https://github.com/hugodro/fudd-1brc.
Beta Was this translation helpful? Give feedback.
All reactions