-
Notifications
You must be signed in to change notification settings - Fork 22
Description
While working on boostorg/json#993 I noticed that JSON benchmark performance when using charconv::from_chars_erange
has degraded since the original release (by ~8% for canada.json and ~6% for numbers.json). I've pinned down the degradation to 9b2e067. It seems that the reason is the log2 table, because I tried putting it in a cpp file and performance increased. Unfortunately, this couldn't be put in a PR, because the function using it is constexpr. Maybe you will find a solution.
Anyway, while looking at the commit, I noticed that this line looks wrong: https://github.com/boostorg/charconv/blob/develop/include/boost/charconv/detail/from_chars_integer_impl.hpp#L225. The value should presumably be std::numeric_limits<Integer>::digits
. If I understand it correctly, this bug can also cause performance degradation.