Commit Graph

36 Commits (master)

Author SHA1 Message Date
Thomas Fussell 04ebd7ef9d fix warnings, bump copyright, fix typo, update npm libs 2021-08-22 08:23:18 -04: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
JCrawfy fbbf7ae767 fix git revert error 2020-03-01 20:46:19 +13:00
JCrawfy 0915fde090 add saving to the spreadsheet-load test, fix a bug in the serialiser 2020-03-01 20:43:56 +13:00
JCrawfy d135f35bd4 minor cleanup 2020-03-01 20:24:22 +13:00
JCrawfy a5aca5c212 add the fixed snprintf serialiser
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                                  969 ns          977 ns       640000
RandFloatStrs/double_from_string_strtod                                   274 ns          270 ns      2488889
RandFloatStrs/double_from_string_strtod_fixed                             273 ns          273 ns      2635294
RandFloatStrs/double_from_string_strtod_fixed_const_ref                   274 ns          276 ns      2488889
RandFloatStrs/double_from_string_std_from_chars                           193 ns          193 ns      3733333
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_ref              273 ns          267 ns      2635294
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_const_ref        273 ns          273 ns      2635294
RandFloats/string_from_double_sstream                                    1323 ns         1311 ns       560000
RandFloats/string_from_double_sstream_cached                             1074 ns         1074 ns       640000
RandFloats/string_from_double_snprintf                                    519 ns          516 ns      1000000
RandFloats/string_from_double_snprintf_fixed                              517 ns          516 ns      1000000
RandFloats/string_from_double_std_to_chars                                118 ns          117 ns      5600000
RandFloatsComma/string_from_double_snprintf_fixed_comma                   520 ns          516 ns      1120000
2020-02-29 23:10:38 +13:00
JCrawfy 7ba36b5e73 fix dumb bug in input randomiser, add basic double->string benchmarks
* input randomiser was feeding a constant value previously, now actually randomising
* start to_string with the current method (sstream), an faster more correct version (sstream_cached), snprintf, and std::to_chars
** NOTE: only std::to_chars and sstream_cached are correct in the face of locales

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                                 1012 ns         1001 ns       640000
RandFloatStrs/double_from_string_strtod                                   276 ns          276 ns      2488889
RandFloatStrs/double_from_string_strtod_fixed                             312 ns          308 ns      2133333
RandFloatStrs/double_from_string_strtod_fixed_const_ref                   307 ns          300 ns      2240000
RandFloatStrs/double_from_string_std_from_chars                           194 ns          188 ns      3733333
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_ref              315 ns          314 ns      2240000
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_const_ref        306 ns          305 ns      2357895
RandFloats/string_from_double_sstream                                    1372 ns         1381 ns       497778
RandFloats/string_from_double_sstream_cached                             1136 ns         1123 ns       640000
RandFloats/string_from_double_snprintf                                    536 ns          516 ns      1000000
RandFloats/string_from_double_std_to_chars                                116 ns          115 ns      6400000
2020-02-29 22:59:25 +13:00
JCrawfy 0adb8a69b1 add micro benchmarking project, setup number parsing benchmark
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
2020-02-29 22:11:31 +13:00
JCrawfy ad7933d783 and another silent one... 2019-11-16 12:59:58 +13:00
JCrawfy fa58994a14 add sheet load time benchmark 2019-11-16 11:25:29 +13:00
Crzyrndm 808765ea39 format as milliseconds 2018-07-29 15:11:19 +12:00
Crzyrndm ba54f9eaa3 Reduce run-time of benchmark by 16x (160k to 10k cells) 2018-07-29 15:05:21 +12:00
Crzyrndm 138c90883b Modify writer benchmark to make comparisons between column and row usage
- Cut time to write a sheet with many rows by not calling highest_row inside a loop over the rows (On^2 -> On)
- Observation: more memory is used / cell as the number of rows increases
2018-07-29 10:11:00 +12:00
Thomas Fussell 0af7ad88e1 Merge branch 'tasmail-master-shared-strings-performance' into dev
remove less than comparators

fix conflicts
2018-07-23 00:10:16 -04:00
Andrii Tkachenko f460bb2678 benchmarks. Rows/columns value/format performance. 2018-02-07 09:31:17 +01:00
Andrii Tkachenko 1aac106a40 Test of row/columns generation with random format. 2018-02-07 07:22:33 +01:00
Andrii Tkachenko 2459b336ef benchmarks. Format benchmarks added. Load formats and styles benchmarks added. 2018-02-05 12:33:26 +01:00
Andrii Tkachenko f918c6cfaf benchmarks. Styles benchmarks updated with logs. Performance improved. 2018-02-05 10:51:01 +01:00
Andrii Tkachenko 1c50b35940 benchmarks. Styles benchmarks updated with logs. Performance improved. 2018-02-05 10:06:32 +01:00
Thomas Fussell 90633d0e8e copyright year bump (2018) 2018-01-22 09:38:48 -05:00
Thomas Fussell f27df9732c add option to enable linking with static C runtime when compiling with MSVC, #214 2017-09-13 10:20:51 -04:00
Thomas Fussell 7ed14246b2 clean up cmake files and add d suffix to xlnt debug library, closes #214 2017-09-08 14:33:18 -04:00
Thomas Fussell 104e3bea25 clean up samples and benchmarks, data handling 2017-04-13 20:18:32 -04:00
Thomas Fussell b85680c5ed start rewiring tests 2017-04-13 19:01:30 -04:00
Thomas Fussell 05fb40438c Merge branch 'master' of github.com:tfussell/xlnt 2017-04-11 17:57:56 -04:00
Thomas Fussell 9fa9343d89 fix some stuff 2017-04-11 17:49:07 -04:00
Thomas Fussell c448536e38 change benchmark call away from removed cell method, fix benchmark warnings 2017-03-21 19:14:27 -04:00
Thomas Fussell c87fdb1a1a link zlib to samples and benchmarks as a temporary workaround 2017-03-05 23:08:32 -05:00
Thomas Fussell 533a20bdc3 fix samples cmake lists 2017-03-05 22:59:55 -05:00
Thomas Fussell 0aa26019e2 clean up cmake lists 2017-03-05 22:39:27 -05:00
Thomas Fussell ba533688c3 update samples and benchmarks build, work on ci scripts 2017-02-28 00:07:37 -05:00
Thomas Fussell 838f358f34 make benchmarks show something useful 2016-12-04 12:20:12 +01:00
Thomas Fussell 07a197cd31 fix up benchmarks a bit 2016-12-03 16:31:30 +01:00
Thomas Fussell b42697e4cb begin working on benchmarks for #29 2016-12-03 12:13:17 +01:00
Thomas Fussell c49341c82f clean up cmake build, fix warnings, improve configuration, general
housekeeping, fixes #72, fixes #70
2016-10-25 20:22:22 -04:00
Thomas Fussell a8be9fff32 start porting benchmarks 2016-02-06 10:04:41 -05:00