relating to previous work https://github.com/tfussell/xlnt/issues/422
Results are matching what was observed at the time ^^ was being worked on
std::from_chars is included as the target to beat, but since only MSVC has it for floating point it's not
hugely useful yet
uniform real distribution is probably a horrible choice, and it might be good to randomise the number
of sf in each string also (currently the y all end up at max length)
Run on (4 X 3500 MHz CPU s)
CPU Caches:
L1 Data 32K (x4)
L1 Instruction 32K (x4)
L2 Unified 262K (x4)
L3 Unified 6291K (x1)
----------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------------------------------------------
RandFloats/double_from_string_sstream 804 ns 820 ns 896000
RandFloats/double_from_string_strtod 163 ns 162 ns 5973333
RandFloats/double_from_string_strtod_fixed 175 ns 172 ns 5352107
RandFloats/double_from_string_strtod_fixed_const_ref 150 ns 152 ns 5352107
RandFloats/double_from_string_std_from_chars 87.1 ns 88.3 ns 9557333
RandFloatsComma/double_from_string_strtod_fixed_comma_ref 172 ns 173 ns 5146257
RandFloatsComma/double_from_string_strtod_fixed_comma_const_ref 180 ns 175 ns 5352107
inlineStr XML structure is <c><is><t>. This was being parsed incorrectly
when streaming (because has_value wasn't being set to true) and when
reading the whole file (because the <t> was ignored).
[closes#445]
Tested on g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Note: Actually,it is not a BUG. It is compiler related issue. The issue #385 is not shown in g++-6 and clang.
this was being done already in most cases, and allows some simplification
e.g. no need to check if something is already present, since we're starting with a blank