3 ms·
At least many of those are thread-local. But not C locale, it is truly horrible.
by leni536 4y ago
At least many of those are thread-local. But not C locale, it is truly horrible.
- account42 4y agoOTOH MXCSR being threadlocal means that automatically linking crtfastmath.o makes even less sense as it only affects the inital thread that loaded the object so you still need to set FTY/DAZ manually if you really want them. And implicit locales should just die. It's sad that even newer functionality like std::format relies on them. Sadder that if it didn't then you'd probably have compiler developers pulling shit like GCC/libstdc++ does for std::from_chars [0] which defeats the entire point of that function but hey, at least they can mark that as implemented. Not like there are suitably licensed implementations of the functionality [1] available that they could use instead if they don't want to implement float parsing themselves. [0] https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/src/c++17/floating_from_chars.cc#L329 https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/s... [1] https://github.com/fastfloat/fast_float https://github.com/fastfloat/fast_float
- leni536 4y agoI thought that std::format avoided most of the implicit locale dependency. I know it has some for date formatting though.