Commit Graph

14 Commits (04ebd7ef9dd87512dab33091812ad591e3bee0bd)

Author SHA1 Message Date
Thomas Fussell 04ebd7ef9d fix warnings, bump copyright, fix typo, update npm libs 2021-08-22 08:23:18 -04:00
Thomas Fussell 70eb0d4e66 undef min and max, fixes #545 2021-02-21 08:00:10 -04:00
JCrawfy 9d9d5de511 add missing include 2020-04-26 15:27:51 +12:00
JCrawfy d30e705f83 fix most (all?) the places where string<->double conversions are performed
strod / stod / to_string and all related friends are dependant on current locale for how they format a number
2020-04-25 14:00:58 +12:00
Joel Bodenmann 4e0333ac91 Remove superfluous semicolon 2020-03-25 13:16:02 +01:00
JCrawfy f4d00acb9f resolve warnings 2020-03-02 13:32:39 +13:00
JCrawfy e8cb8d9bc6 fix compiler error 2020-03-01 23:23:20 +13:00
JCrawfy ee593c2673 bug fixes, move the faster serialisation into the numeric header
serialisation ends up roughly 2x improvement going from sstream to snprintf

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
-------------------------------------------------------------------------------------------------------------
RandFloatStrs/double_from_string_sstream                                  968 ns          977 ns       640000
RandFloatStrs/double_from_string_strtod                                   272 ns          270 ns      2488889
RandFloatStrs/double_from_string_strtod_fixed                             272 ns          270 ns      2488889
RandFloatStrs/double_from_string_strtod_fixed_const_ref                   273 ns          270 ns      2488889
RandFloatStrs/double_from_string_std_from_chars                           193 ns          195 ns      3446154
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_ref              272 ns          273 ns      2635294
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_const_ref        276 ns          273 ns      2635294
RandFloats/string_from_double_sstream                                    1311 ns         1318 ns       497778
RandFloats/string_from_double_sstream_cached                             1076 ns         1050 ns       640000
RandFloats/string_from_double_snprintf                                    601 ns          600 ns      1120000
RandFloats/string_from_double_snprintf_fixed                              600 ns          600 ns      1120000
RandFloats/string_from_double_std_to_chars                                117 ns          117 ns      5600000
RandFloatsComma/string_from_double_snprintf_fixed_comma                   600 ns          600 ns      1120000
2020-03-01 22:01:14 +13:00
Thomas Fussell e8ee585897
bump copyright year to 2020 2020-02-08 12:12:59 -05:00
Thomas Fussell a560756b35 use clang-format, fix some small warnings 2019-12-26 12:03:12 -05:00
JCrawfy 613d7b6086 add missing include 2019-11-18 21:39:33 +13:00
JCrawfy 7621b2807a fix wrong iterator bug 2019-11-18 20:43:58 +13:00
JCrawfy d69a5dea75 scan and replace '.' with ',' when decimal separator is comma 2019-11-18 19:55:13 +13:00
JCrawfy 2eb88c23d6 move numeric utils into the public headers
resolves #398
2019-11-18 19:25:02 +13:00