Don't create a new locale on every to_string() call.
Creating locales is surprisingly expensive. We have an application where we - especially during tests - write large amounts of Thrift dumps to disk, and is this application we currently spend around 17% of total CPU time in std::locale's constructor. With this change, it's basically down to zero.
L
Lukas Barth committed
46b1283d18d27bcbcfe4298ed074e81dac081fe2
Parent: dd2e0d4
Committed by Jens Geyer <Jens-G@users.noreply.github.com>
on 6/10/2023, 12:48:30 PM