You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 slow stof/stod was, I switched to convert the whole and decimal parts to integers and then used from_char which was much quicker.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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