+
+#if wxUSE_STL
+ // At least in some environments, e.g. MinGW-64, if the global C++ locale
+ // is different from the global C locale, all stream operations temporarily
+ // change the locale resulting in a huge slowdown (3 times slower in some
+ // real-life applications), so change the C++ locale to match.
+ std::locale::global(std::locale(""));
+#endif //wxUSE_STL
+