dash/doc/benchmarking.md

166 lines
9.6 KiB
Markdown
Raw Normal View History

Benchmarking
============
Dash Core has an internal benchmarking framework, with benchmarks
for cryptographic algorithms (e.g. SHA1, SHA256, SHA512, RIPEMD160), as well as the rolling bloom filter.
Running
---------------------
After compiling Dash Core, the benchmarks can be run with:
src/bench/bench_dash
The output will look similar to:
```
#Benchmark,count,min(ns),max(ns),average(ns),min_cycles,max_cycles,average_cycles
BLSDKG_BuildQuorumVerificationVectors_parallel_10,704,1399697,1497810,1430036,3211716,3436845,3281333
BLSDKG_BuildQuorumVerificationVectors_parallel_100,12,99035786,101316134,99729727,227245446,232477960,228837811
BLSDKG_BuildQuorumVerificationVectors_parallel_400,2,1589266297,1589266297,1589266297,3646698139,3646698139,3646698139
BLSDKG_BuildQuorumVerificationVectors_simple_10,256,3908369,4242371,4033544,8968064,9734474,9255290
BLSDKG_BuildQuorumVerificationVectors_simple_100,4,375179651,376536686,375858169,860879635,863993434,862436534
BLSDKG_BuildQuorumVerificationVectors_simple_400,2,6039710258,6039710258,6039710258,13858596395,13858596395,13858596395
BLSDKG_VerifyContributionShares_aggregated_10,26,36899700,41364237,38936903,84669343,94913488,89343827
BLSDKG_VerifyContributionShares_aggregated_100,2,1662641204,1662641204,1662641204,3815062730,3815062730,3815062730
BLSDKG_VerifyContributionShares_aggregated_400,2,14616986793,14616986793,14616986793,33539840892,33539840892,33539840892
BLSDKG_VerifyContributionShares_parallel_10,104,9356764,12185841,9778710,21469836,27961383,22438031
BLSDKG_VerifyContributionShares_parallel_100,2,706528236,706528236,706528236,1621185327,1621185327,1621185327
BLSDKG_VerifyContributionShares_parallel_400,2,11002241613,11002241613,11002241613,25245520135,25245520135,25245520135
BLSDKG_VerifyContributionShares_parallel_aggregated_10,80,12215833,14349386,13188432,28030202,32925802,30261910
BLSDKG_VerifyContributionShares_parallel_aggregated_100,4,387910076,442382377,415146227,890090576,1015081642,952586109
BLSDKG_VerifyContributionShares_parallel_aggregated_400,2,3824768297,3824768297,3824768297,8776235667,8776235667,8776235667
BLSDKG_VerifyContributionShares_simple_10,36,30537900,31343020,30826660,70071654,71919048,70734229
BLSDKG_VerifyContributionShares_simple_100,2,2786751371,2786751371,2786751371,6394423130,6394423130,6394423130
BLSDKG_VerifyContributionShares_simple_400,2,43357125687,43357125687,43357125687,99486425209,99486425209,99486425209
BLSPubKeyAggregate_Normal,14336,69705,71509,70365,159944,164085,161460
BLSSecKeyAggregate_Normal,655360,1577,1701,1590,3619,3903,3649
BLSSign_Normal,256,3920386,4489107,4100818,8995714,10300622,9409668
BLSVerify_Batched,208,4171190,13519600,5783653,9571142,31021854,13271073
BLSVerify_BatchedParallel,768,1123655,1732350,1388469,2578320,3975022,3185958
BLSVerify_LargeAggregatedBlock1000,2,4110864469,4110864469,4110864469,9432718832,9432718832,9432718832
BLSVerify_LargeAggregatedBlock10000,2,41010492441,41010492441,41010492441,94101952688,94101952688,94101952688
BLSVerify_LargeAggregatedBlock1000PreVerified,4,490207286,491448876,490828081,1124820912,1127669823,1126245367
BLSVerify_LargeBlock1000,2,9001585461,9001585461,9001585461,20654877047,20654877047,20654877047
BLSVerify_LargeBlockSelfAggregated1000,2,4171002256,4171002256,4171002256,9570706905,9570706905,9570706905
BLSVerify_LargeBlockSelfAggregated10000,2,41156496178,41156496178,41156496178,94436944969,94436944969,94436944969
BLSVerify_Normal,120,8641620,9167980,8817814,19828899,21036717,20233196
Base58CheckEncode,327680,3258,3336,3305,7476,7654,7584
Base58Decode,851968,1186,1217,1204,2722,2793,2764
Base58Encode,458752,2173,2202,2189,4987,5052,5023
BenchLockedPool,320,3121007,3186697,3148930,7161412,7312136,7225478
CCheckQueueSpeed,8192,110425,152908,133263,253383,350861,305784
CCheckQueueSpeedPrevectorJob,1024,935139,1536040,989425,2145753,3524574,2270317
CCoinsCaching,212992,4939,5337,5030,11333,12248,11542
CHACHA20_1MB,448,2257940,2310387,2285812,5181029,5301376,5244984
CHACHA20_256BYTES,1835008,560,577,570,1285,1324,1309
CHACHA20_64BYTES,6815744,148,155,152,340,355,350
CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT,160,6252800,7065589,6419857,14347569,16212568,14730887
CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT,320,3151067,3200999,3175685,7230379,7344956,7286870
CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT,491520,2059,2186,2091,4725,5016,4798
CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT,983040,1035,1075,1048,2375,2467,2406
CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT,1179648,917,951,933,2105,2183,2142
CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT,2359296,465,474,470,1067,1087,1079
CoinSelection,448,2284556,2375018,2330599,5242101,5449673,5347749
DeserializeAndCheckBlockTest,208,4882918,5744853,5173432,11204249,13182095,11870863
DeserializeBlockTest,224,4304003,4984282,4470468,9875888,11436885,10257855
ECDSASign,20480,51538,55658,52832,118259,127712,121228
ECDSAVerify,12288,81739,84176,82480,187557,193150,189257
ECDSAVerify_LargeBlock,12,83471337,84588244,84113706,191531781,194094607,193005759
FastRandom_1bit,640,1593260,1626135,1605721,3655865,3731305,3684459
FastRandom_32bit,104,10173971,10475893,10349270,23344997,24037795,23747245
HASH_1MB,288,3550501,3646088,3577692,8146915,8366255,8209307
HASH_256BYTES,786432,1350,1404,1385,3098,3221,3178
HASH_64BYTES,1441792,717,740,733,1645,1698,1682
HASH_DSHA256,320,3373100,3419626,3404137,7739845,7846611,7811070
HASH_DSHA256_0032b,2,517102286,517102286,517102286,1186533413,1186533413,1186533413
HASH_DSHA256_0032b_single,1966080,507,522,518,1164,1199,1188
HASH_DSHA256_0080b_single,1441792,732,744,737,1680,1707,1691
HASH_DSHA256_0128b_single,1048576,947,980,956,2174,2250,2195
HASH_DSHA256_0512b_single,458752,2202,2382,2281,5053,5467,5236
HASH_DSHA256_1024b_single,262144,3926,4091,3982,9008,9388,9138
HASH_DSHA256_2048b_single,147456,7391,7641,7510,16961,17533,17234
HASH_RIPEMD160,384,2680162,2767753,2737282,6149849,6350832,6280918
HASH_SHA1,512,2005465,2218449,2042382,4601703,5090415,4686414
HASH_SHA256,320,3360086,3408018,3385936,7709991,7819982,7769307
HASH_SHA256D64_1024,7168,140563,146289,143313,322534,335673,328845
HASH_SHA256_0032b,6,247481456,247866187,247632065,567866440,568749209,568211978
HASH_SHA512,320,3201464,3273199,3232981,7346023,7510629,7418339
HASH_SipHash_0032b,36,28778743,29584618,29115324,66035173,67884337,66807487
HASH_X11,480,2112322,2766988,2181266,4846896,6349081,5005094
HASH_X11_0032b_single,57344,17770,18406,18231,40774,42235,41833
HASH_X11_0080b_single,57344,18127,18742,18495,41595,43007,42439
HASH_X11_0128b_single,53248,18654,22617,19687,42804,51897,45173
HASH_X11_0512b_single,45056,21955,22980,22517,50379,52730,51668
HASH_X11_1024b_single,45056,23471,26837,24000,53856,61579,55070
HASH_X11_2048b_single,40960,25663,26526,26046,58887,60867,59765
MempoolEviction,45056,21801,23156,22417,50025,53134,51438
MerkleRoot,768,1307235,1333867,1318986,2999559,3060666,3026522
POLY1305_1MB,1152,876525,895608,885109,2011265,2055046,2030955
POLY1305_256BYTES,4194304,234,250,239,538,575,549
POLY1305_64BYTES,13631488,77,79,77,177,181,178
PrevectorAssign,65536,15576,15988,15810,35741,36687,36279
PrevectorAssignTo,262144,4001,4081,4046,9181,9365,9286
PrevectorClearNontrivial,22528,43967,45061,44459,100887,103398,102016
PrevectorClearTrivial,106496,9063,11172,9515,20796,25635,21834
PrevectorDestructorNontrivial,22528,44099,45393,44808,101190,104159,102816
PrevectorDestructorTrivial,106496,9241,9892,9397,21205,22698,21562
PrevectorResizeNontrivial,22528,43942,45080,44549,100829,103440,102222
PrevectorResizeTrivial,106496,9179,11874,9659,21063,27248,22165
RollingBloom-refresh,1,126794,126794,126794
RollingBloom-refresh,1,119840,119840,119840
RollingBloom-refresh,1,119632,119632,119632
RollingBloom-refresh,1,123198,123198,123198
RollingBloom-refresh,1,136900,136900,136900
RollingBloom-refresh,1,119848,119848,119848
RollingBloom-refresh,1,138126,138126,138126
RollingBloom-refresh,1,119845,119845,119845
RollingBloom-refresh,1,121241,121241,121241
RollingBloom-refresh,1,109540,109540,109540
RollingBloom-refresh,1,123938,123938,123938
RollingBloom-refresh,1,119872,119872,119872
RollingBloom-refresh,1,109354,109354,109354
RollingBloom-refresh,1,120078,120078,120078
RollingBloom-refresh,1,136176,136176,136176
RollingBloom-refresh,1,119864,119864,119864
RollingBloom-refresh,1,109518,109518,109518
RollingBloom-refresh,1,119726,119726,119726
RollingBloom-refresh,1,123659,123659,123659
RollingBloom-refresh,1,123630,123630,123630
RollingBloom-refresh,1,126151,126151,126151
RollingBloom-refresh,1,132464,132464,132464
RollingBloom-refresh,1,120060,120060,120060
RollingBloom-refresh,1,128411,128411,128411
RollingBloom-refresh,1,124253,124253,124253
RollingBloom-refresh,1,123863,123863,123863
RollingBloom-refresh,1,133400,133400,133400
RollingBloom-refresh,1,126750,126750,126750
RollingBloom,1703936,569,603,587,1306,1383,1347
Sleep100ms,10,100100567,100143382,100120609,229688902,229787148,229734943
Trig,50331648,14,21,21,34,49,48
int_atoi,335544320,3,3,3,6,7,6
int_lexical_cast,41943040,24,25,25,55,58,57
strings_1_itostr,2359296,431,447,440,991,1026,1010
strings_1_lexical_cast,20971520,46,51,50,106,117,115
strings_1_numberToString,2883584,346,355,352,795,814,807
strings_1_to_string,11534336,82,89,86,190,206,199
strings_2_multi_itostr,491520,2013,2085,2067,4621,4785,4744
strings_2_multi_lexical_cast,3670016,251,286,276,576,657,633
strings_2_multi_numberToString,589824,1732,1851,1794,3975,4248,4117
strings_2_multi_to_string,2097152,462,509,489,1061,1169,1123
strings_2_strptintf,1441792,714,742,727,1639,1704,1669
```
Help
---------------------
`-?` will print a list of options and exit:
src/bench/bench_dash -?
Notes
---------------------
More benchmarks are needed for, in no particular order:
- Script Validation
- CCoinDBView caching
- Coins database
- Memory pool
- Wallet coin selection