Rust solution in 6 seconds #747
rathijitpapon
started this conversation in
Show and tell
Replies: 1 comment
-
Great Work <3 |
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.
-
My implementation takes 6.7 seconds on average to run in my M3 Pro, 11 CPUs, and 18G memory.
Algorithm:
Initially, using standard library approach to split and parse the lines, it took around 13 seconds. Then I iterate over all the lines manually and do the calculation when iterating. It comes down to 6.7 seconds.
I believe there are some better ways to solve this. If anyone has any ideas to improve this, will appreciate them. 🤲
Source codes: https://github.com/rathijitpapon/onebrc
Beta Was this translation helpful? Give feedback.
All reactions