1BRC cpp #381
pr0g
started this conversation in
Show and tell
1BRC cpp
#381
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Nothing terribly clever or exciting (I also cheated and used a separate task library 😬) but this was a fun challenge to play around with. I decided to try and use buffered input instead of using
mmap
, it's possible rewriting to use it instead could be faster. It was telling how insanely slowstof/stod
was, I switched to convert the whole and decimal parts to integers and then usedfrom_char
which was much quicker.Gist is available here.
Runs in ~15 seconds on my MacBook Pro M1 Max (baseline takes about 3 minutes 10 seconds).
Beta Was this translation helpful? Give feedback.
All reactions