top | item 41835941

(no title)

deeringc | 1 year ago

You might want to watch this releavnt video from Stephan T. Lavavej (the Microsoft STL maintainer): https://www.youtube.com/watch?v=4P_kbF0EbZM

discuss

order

userbinator|1 year ago

I don't need to listen to what someone says if I can look at the source myself.

deeringc|1 year ago

I believe the impl you link to is not fully standards compliant, and has an approximate soln.

MSFT's one is totally standards compliant and it is a very different beast: https://github.com/microsoft/STL/blob/main/stl/inc/charconv

Apart from various nuts and bolts optimizations (eg not using locales, better cache friendless, etc...) it also uses a novel algorithm which is an order of magnitude quicker for many floating points tasks (https://github.com/ulfjack/ryu).

If you actually want to learn about this, then watch the video I linked earlier.

secondcoming|1 year ago

You profiled the code in your head?