Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test empty ByteListType #250

Merged
merged 1 commit into from
Apr 8, 2022
Merged

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Apr 8, 2022

Motivation

From issue ChainSafe/lodestar#3896 there is an serialization issue, not covered by any unit test.

Description

  • Test empty ByteListType

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 918b94a Previous: 5c706b4 Ratio
digestTwoHashObjects 50023 times 57.754 ms/op 79.022 ms/op 0.73
digest64 50023 times 60.651 ms/op 82.610 ms/op 0.73
digest 50023 times 60.058 ms/op 82.797 ms/op 0.73
input length 32 1.6300 us/op 2.0490 us/op 0.80
input length 64 1.7360 us/op 2.2110 us/op 0.79
input length 128 2.9840 us/op 3.9100 us/op 0.76
input length 256 4.2890 us/op 5.7240 us/op 0.75
input length 512 6.9570 us/op 9.3330 us/op 0.75
input length 1024 13.423 us/op 18.178 us/op 0.74
digest 1000000 times 1.0590 s/op 1.3482 s/op 0.79
hashObjectToByteArray 50023 times 2.2548 ms/op 2.7405 ms/op 0.82
byteArrayToHashObject 50023 times 3.1749 ms/op 3.7724 ms/op 0.84
getGindicesAtDepth 7.2440 us/op 8.5730 us/op 0.84
iterateAtDepth 14.859 us/op 18.039 us/op 0.82
getGindexBits 637.00 ns/op 905.00 ns/op 0.70
gindexIterator 1.5640 us/op 1.8900 us/op 0.83
hash 2 Uint8Array 2250026 times 2.7791 s/op 3.8417 s/op 0.72
hashTwoObjects 2250026 times 2.6152 s/op 3.6517 s/op 0.72
getNodeH() x7812.5 avg hindex 21.799 us/op 24.708 us/op 0.88
getNodeH() x7812.5 index 0 8.3650 us/op 7.9720 us/op 1.05
getNodeH() x7812.5 index 7 8.3310 us/op 8.0930 us/op 1.03
getNodeH() x7812.5 index 7 with key array 8.3330 us/op 7.9060 us/op 1.05
new LeafNode() x7812.5 240.49 us/op 524.11 us/op 0.46
packedRootsBytesToLeafNodes bytes 4000 offset 0 5.3550 us/op 10.974 us/op 0.49
packedRootsBytesToLeafNodes bytes 4000 offset 1 5.3230 us/op 10.279 us/op 0.52
packedRootsBytesToLeafNodes bytes 4000 offset 2 5.3920 us/op 11.507 us/op 0.47
packedRootsBytesToLeafNodes bytes 4000 offset 3 5.4140 us/op 10.905 us/op 0.50
subtreeFillToContents depth 40 count 250000 58.063 ms/op 106.93 ms/op 0.54
setRoot - gindexBitstring 23.403 ms/op 25.421 ms/op 0.92
setRoot - gindex 24.579 ms/op 24.345 ms/op 1.01
getRoot - gindexBitstring 3.3821 ms/op 3.5544 ms/op 0.95
getRoot - gindex 9.0138 ms/op 4.5237 ms/op 1.99
getHashObject then setHashObject 42.707 ms/op 28.525 ms/op 1.50
setNodeWithFn 39.390 ms/op 24.907 ms/op 1.58
getNodeAtDepth depth 0 x100000 2.0348 ms/op 2.0166 ms/op 1.01
setNodeAtDepth depth 0 x100000 10.185 ms/op 6.1438 ms/op 1.66
getNodesAtDepth depth 0 x100000 1.7236 ms/op 1.7842 ms/op 0.97
setNodesAtDepth depth 0 x100000 2.3544 ms/op 2.4397 ms/op 0.97
getNodeAtDepth depth 1 x100000 2.1692 ms/op 2.1197 ms/op 1.02
setNodeAtDepth depth 1 x100000 22.161 ms/op 14.797 ms/op 1.50
getNodesAtDepth depth 1 x100000 1.8872 ms/op 2.0698 ms/op 0.91
setNodesAtDepth depth 1 x100000 15.466 ms/op 11.420 ms/op 1.35
getNodeAtDepth depth 2 x100000 2.6787 ms/op 2.7011 ms/op 0.99
setNodeAtDepth depth 2 x100000 28.202 ms/op 24.540 ms/op 1.15
getNodesAtDepth depth 2 x100000 12.872 ms/op 12.466 ms/op 1.03
setNodesAtDepth depth 2 x100000 34.019 ms/op 33.611 ms/op 1.01
tree.getNodesAtDepth - gindexes 11.559 ms/op 10.927 ms/op 1.06
tree.getNodesAtDepth - push all nodes 3.9510 ms/op 3.9360 ms/op 1.00
tree.getNodesAtDepth - navigation 340.52 us/op 275.21 us/op 1.24
tree.setNodesAtDepth - indexes 677.57 us/op 840.82 us/op 0.81
set at depth 8 1.1090 us/op 1.3540 us/op 0.82
set at depth 16 1.1650 us/op 1.2630 us/op 0.92
set at depth 32 2.4300 us/op 2.8320 us/op 0.86
iterateNodesAtDepth 8 256 22.648 us/op 27.550 us/op 0.82
getNodesAtDepth 8 256 5.6060 us/op 5.8790 us/op 0.95
iterateNodesAtDepth 16 65536 6.4907 ms/op 7.8662 ms/op 0.83
getNodesAtDepth 16 65536 3.5081 ms/op 3.3333 ms/op 1.05
iterateNodesAtDepth 32 250000 24.215 ms/op 28.785 ms/op 0.84
getNodesAtDepth 32 250000 8.3152 ms/op 8.4912 ms/op 0.98
iterateNodesAtDepth 40 250000 24.598 ms/op 28.192 ms/op 0.87
getNodesAtDepth 40 250000 8.2474 ms/op 8.4027 ms/op 0.98
250k validators 3.3400 s/op 4.5970 s/op 0.73
bitlist bytes to struct (120,90) 1.9120 us/op 1.8910 us/op 1.01
bitlist bytes to tree (120,90) 7.7000 us/op 5.6940 us/op 1.35
bitlist bytes to struct (2048,2048) 3.3160 us/op 2.3070 us/op 1.44
bitlist bytes to tree (2048,2048) 13.326 us/op 8.9000 us/op 1.50
ByteListType - deserialize 24.167 ms/op 19.499 ms/op 1.24
BasicListType - deserialize 40.458 ms/op 20.069 ms/op 2.02
ByteListType - serialize 23.611 ms/op 18.559 ms/op 1.27
BasicListType - serialize 33.240 ms/op 22.888 ms/op 1.45
BasicListType - tree_convertToStruct 80.044 ms/op 42.149 ms/op 1.90
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 7.7097 ms/op 7.6566 ms/op 1.01
List[uint8, 68719476736] len 300000 ViewDU.get(i) 6.3967 ms/op 7.1440 ms/op 0.90
Array.push len 300000 empty Array - number 10.059 ms/op 9.3114 ms/op 1.08
Array.set len 300000 from new Array - number 3.4020 ms/op 2.9897 ms/op 1.14
Array.set len 300000 - number 8.7955 ms/op 10.185 ms/op 0.86
Uint8Array.set len 300000 287.78 us/op 320.46 us/op 0.90
Uint32Array.set len 300000 547.59 us/op 557.63 us/op 0.98
Container({a: uint8, b: uint8}) getViewDU x300000 56.622 ms/op 54.667 ms/op 1.04
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 16.314 ms/op 19.070 ms/op 0.86
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 398.51 ms/op 426.41 ms/op 0.93
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 508.25 ms/op 583.96 ms/op 0.87
List(Container) len 300000 ViewDU.get(i) 22.975 ms/op 16.836 ms/op 1.36
List(Container) len 300000 ViewDU.getReadonly(i) 21.941 ms/op 16.146 ms/op 1.36
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 70.770 ms/op 79.376 ms/op 0.89
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 10.674 ms/op 9.4146 ms/op 1.13
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 21.361 ms/op 14.046 ms/op 1.52
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 21.544 ms/op 14.752 ms/op 1.46
Array.push len 300000 empty Array - object 9.4424 ms/op 9.6839 ms/op 0.98
Array.set len 300000 from new Array - object 4.3327 ms/op 3.0420 ms/op 1.42
Array.set len 300000 - object 9.5934 ms/op 9.4920 ms/op 1.01
cachePermanentRootStruct no cache 13.243 us/op 18.052 us/op 0.73
cachePermanentRootStruct with cache 462.00 ns/op 562.00 ns/op 0.82
epochParticipation len 250000 rws 7813 3.7614 ms/op 4.1077 ms/op 0.92
deserialize Attestation - tree 5.0320 us/op 6.2110 us/op 0.81
deserialize Attestation - struct 3.2910 us/op 3.7530 us/op 0.88
deserialize SignedAggregateAndProof - tree 6.3900 us/op 7.8700 us/op 0.81
deserialize SignedAggregateAndProof - struct 5.3190 us/op 6.3660 us/op 0.84
deserialize SyncCommitteeMessage - tree 1.5110 us/op 1.8510 us/op 0.82
deserialize SyncCommitteeMessage - struct 1.9590 us/op 2.0730 us/op 0.95
deserialize SignedContributionAndProof - tree 3.6350 us/op 4.3430 us/op 0.84
deserialize SignedContributionAndProof - struct 4.5040 us/op 4.9240 us/op 0.91
deserialize SignedBeaconBlock - tree 390.64 us/op 465.05 us/op 0.84
deserialize SignedBeaconBlock - struct 239.27 us/op 281.00 us/op 0.85
BeaconState vc 300000 - deserialize tree 986.56 ms/op 1.1463 s/op 0.86
BeaconState vc 300000 - serialize tree 340.04 ms/op 382.79 ms/op 0.89
BeaconState.historicalRoots vc 300000 - deserialize tree 1.3380 us/op 1.8620 us/op 0.72
BeaconState.historicalRoots vc 300000 - serialize tree 1.6500 us/op 1.8570 us/op 0.89
BeaconState.validators vc 300000 - deserialize tree 899.82 ms/op 1.0095 s/op 0.89
BeaconState.validators vc 300000 - serialize tree 235.75 ms/op 273.92 ms/op 0.86
BeaconState.balances vc 300000 - deserialize tree 40.230 ms/op 44.112 ms/op 0.91
BeaconState.balances vc 300000 - serialize tree 9.3085 ms/op 7.7996 ms/op 1.19
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 1.1974 ms/op 1.0950 ms/op 1.09
BeaconState.previousEpochParticipation vc 300000 - serialize tree 509.72 us/op 487.34 us/op 1.05
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 1.1822 ms/op 1.1390 ms/op 1.04
BeaconState.currentEpochParticipation vc 300000 - serialize tree 509.19 us/op 455.94 us/op 1.12
BeaconState.inactivityScores vc 300000 - deserialize tree 41.143 ms/op 41.312 ms/op 1.00
BeaconState.inactivityScores vc 300000 - serialize tree 10.114 ms/op 9.7945 ms/op 1.03
hashTreeRoot Attestation - struct 93.352 us/op 84.683 us/op 1.10
hashTreeRoot Attestation - tree 26.256 us/op 35.360 us/op 0.74
hashTreeRoot SignedAggregateAndProof - struct 98.928 us/op 114.16 us/op 0.87
hashTreeRoot SignedAggregateAndProof - tree 38.987 us/op 53.573 us/op 0.73
hashTreeRoot SyncCommitteeMessage - struct 24.608 us/op 26.192 us/op 0.94
hashTreeRoot SyncCommitteeMessage - tree 9.1710 us/op 12.404 us/op 0.74
hashTreeRoot SignedContributionAndProof - struct 68.167 us/op 71.488 us/op 0.95
hashTreeRoot SignedContributionAndProof - tree 34.068 us/op 42.453 us/op 0.80
hashTreeRoot SignedBeaconBlock - struct 4.0988 ms/op 5.2975 ms/op 0.77
hashTreeRoot SignedBeaconBlock - tree 2.3220 ms/op 3.1562 ms/op 0.74
hashTreeRoot Validator - struct 20.817 us/op 25.629 us/op 0.81
hashTreeRoot Validator - tree 16.916 us/op 22.065 us/op 0.77
BeaconState vc 300000 - hashTreeRoot tree 5.2353 s/op 6.8257 s/op 0.77
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 2.2680 us/op 2.7740 us/op 0.82
BeaconState.validators vc 300000 - hashTreeRoot tree 5.0229 s/op 6.5517 s/op 0.77
BeaconState.balances vc 300000 - hashTreeRoot tree 124.02 ms/op 174.41 ms/op 0.71
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 12.537 ms/op 16.759 ms/op 0.75
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 12.542 ms/op 16.992 ms/op 0.74
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 141.97 ms/op 155.81 ms/op 0.91
hash64 x18 26.577 us/op 36.924 us/op 0.72
hashTwoObjects x18 23.841 us/op 31.957 us/op 0.75
hash64 x1740 2.5073 ms/op 3.4696 ms/op 0.72
hashTwoObjects x1740 2.2348 ms/op 3.0366 ms/op 0.74
hash64 x2700000 3.8649 s/op 5.4509 s/op 0.71
hashTwoObjects x2700000 3.4536 s/op 4.8603 s/op 0.71
get_exitEpoch - ContainerType 485.00 ns/op 612.00 ns/op 0.79
get_exitEpoch - ContainerNodeStructType 411.00 ns/op 482.00 ns/op 0.85
set_exitEpoch - ContainerType 454.00 ns/op 573.00 ns/op 0.79
set_exitEpoch - ContainerNodeStructType 422.00 ns/op 528.00 ns/op 0.80
get_pubkey - ContainerType 1.9930 us/op 2.0520 us/op 0.97
get_pubkey - ContainerNodeStructType 425.00 ns/op 536.00 ns/op 0.79
hashTreeRoot - ContainerType 1.1220 us/op 1.1090 us/op 1.01
hashTreeRoot - ContainerNodeStructType 1.2330 us/op 1.1760 us/op 1.05
createProof - ContainerType 10.045 us/op 9.2910 us/op 1.08
createProof - ContainerNodeStructType 47.734 us/op 52.814 us/op 0.90
serialize - ContainerType 3.8030 us/op 3.8920 us/op 0.98
serialize - ContainerNodeStructType 2.9750 us/op 3.1190 us/op 0.95
set_exitEpoch_and_hashTreeRoot - ContainerType 7.2420 us/op 9.2280 us/op 0.78
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 18.567 us/op 25.458 us/op 0.73
Array - for of 10.876 us/op 37.786 us/op 0.29
Array - for(;;) 7.4690 us/op 35.178 us/op 0.21
basicListValue.readonlyValuesArray() 9.9114 ms/op 9.5498 ms/op 1.04
basicListValue.readonlyValuesArray() + loop all 9.0130 ms/op 9.3943 ms/op 0.96
compositeListValue.readonlyValuesArray() 50.250 ms/op 77.932 ms/op 0.64
compositeListValue.readonlyValuesArray() + loop all 46.676 ms/op 72.665 ms/op 0.64
Number64UintType - get balances list 1.8999 ms/op 1.8699 ms/op 1.02
Number64UintType - set balances list 18.558 ms/op 18.639 ms/op 1.00
Number64UintType - get and increase 10 then set 58.506 ms/op 59.090 ms/op 0.99
Number64UintType - increase 10 using applyDelta 22.674 ms/op 21.912 ms/op 1.03
Number64UintType - increase 10 using applyDeltaInBatch 22.705 ms/op 21.708 ms/op 1.05
tree_newTreeFromUint64Deltas 41.214 ms/op 49.568 ms/op 0.83
unsafeUint8ArrayToTree 53.465 ms/op 78.344 ms/op 0.68
bitLength(50) 459.00 ns/op 624.00 ns/op 0.74
bitLengthStr(50) 695.00 ns/op 804.00 ns/op 0.86
bitLength(8000) 452.00 ns/op 584.00 ns/op 0.77
bitLengthStr(8000) 830.00 ns/op 965.00 ns/op 0.86
bitLength(250000) 453.00 ns/op 571.00 ns/op 0.79
bitLengthStr(250000) 907.00 ns/op 1.0860 us/op 0.84
floor - Math.floor (53) 0.67742 ns/op 0.69390 ns/op 0.98
floor - << 0 (53) 0.50929 ns/op 0.69751 ns/op 0.73
floor - Math.floor (512) 0.67710 ns/op 0.68980 ns/op 0.98
floor - << 0 (512) 0.50862 ns/op 0.69225 ns/op 0.73
fnIf(0) 2.6974 ns/op 2.1793 ns/op 1.24
fnSwitch(0) 3.7087 ns/op 2.3322 ns/op 1.59
fnObj(0) 0.67783 ns/op 0.69132 ns/op 0.98
fnArr(0) 0.67723 ns/op 0.68594 ns/op 0.99
fnIf(4) 4.3792 ns/op 3.2091 ns/op 1.36
fnSwitch(4) 5.0560 ns/op 3.1214 ns/op 1.62
fnObj(4) 0.67705 ns/op 0.68743 ns/op 0.98
fnArr(4) 0.67695 ns/op 0.68402 ns/op 0.99
fnIf(9) 6.7483 ns/op 4.2979 ns/op 1.57
fnSwitch(9) 6.7473 ns/op 4.2117 ns/op 1.60
fnObj(9) 0.67696 ns/op 0.68106 ns/op 0.99
fnArr(9) 0.67713 ns/op 0.68039 ns/op 1.00
Container {a,b,vec} - as struct x100000 68.306 us/op 68.703 us/op 0.99
Container {a,b,vec} - as tree x100000 813.08 us/op 700.42 us/op 1.16
Container {a,vec,b} - as struct x100000 102.47 us/op 106.50 us/op 0.96
Container {a,vec,b} - as tree x100000 846.27 us/op 781.34 us/op 1.08
get 2 props x1000000 - rawObject 340.56 us/op 392.56 us/op 0.87
get 2 props x1000000 - proxy 117.13 ms/op 125.41 ms/op 0.93
get 2 props x1000000 - customObj 340.12 us/op 398.87 us/op 0.85
Simple object binary -> struct 933.00 ns/op 1.2870 us/op 0.72
Simple object binary -> tree_backed 2.5930 us/op 3.6130 us/op 0.72
Simple object struct -> tree_backed 3.6530 us/op 4.8140 us/op 0.76
Simple object tree_backed -> struct 3.1180 us/op 3.9740 us/op 0.78
Simple object struct -> binary 1.7270 us/op 1.9510 us/op 0.89
Simple object tree_backed -> binary 2.8680 us/op 3.4350 us/op 0.83
aggregationBits binary -> struct 798.00 ns/op 1.0510 us/op 0.76
aggregationBits binary -> tree_backed 3.5520 us/op 3.7310 us/op 0.95
aggregationBits struct -> tree_backed 4.5980 us/op 4.6350 us/op 0.99
aggregationBits tree_backed -> struct 1.9250 us/op 1.7910 us/op 1.07
aggregationBits struct -> binary 1.4830 us/op 1.4860 us/op 1.00
aggregationBits tree_backed -> binary 1.8620 us/op 2.0210 us/op 0.92
List(uint8) 100000 binary -> struct 2.6871 ms/op 1.7287 ms/op 1.55
List(uint8) 100000 binary -> tree_backed 255.17 us/op 273.01 us/op 0.93
List(uint8) 100000 struct -> tree_backed 2.4127 ms/op 2.2887 ms/op 1.05
List(uint8) 100000 tree_backed -> struct 1.6044 ms/op 1.4673 ms/op 1.09
List(uint8) 100000 struct -> binary 2.1673 ms/op 2.1158 ms/op 1.02
List(uint8) 100000 tree_backed -> binary 142.36 us/op 162.07 us/op 0.88
List(uint64Number) 100000 binary -> struct 1.7237 ms/op 1.9292 ms/op 0.89
List(uint64Number) 100000 binary -> tree_backed 5.7240 ms/op 10.667 ms/op 0.54
List(uint64Number) 100000 struct -> tree_backed 8.8458 ms/op 13.121 ms/op 0.67
List(uint64Number) 100000 tree_backed -> struct 4.0795 ms/op 3.3052 ms/op 1.23
List(uint64Number) 100000 struct -> binary 2.7112 ms/op 2.4649 ms/op 1.10
List(uint64Number) 100000 tree_backed -> binary 2.7628 ms/op 1.5359 ms/op 1.80
List(Uint64Bigint) 100000 binary -> struct 5.7593 ms/op 7.1989 ms/op 0.80
List(Uint64Bigint) 100000 binary -> tree_backed 6.4635 ms/op 10.328 ms/op 0.63
List(Uint64Bigint) 100000 struct -> tree_backed 9.9215 ms/op 13.756 ms/op 0.72
List(Uint64Bigint) 100000 tree_backed -> struct 8.4022 ms/op 8.8787 ms/op 0.95
List(Uint64Bigint) 100000 struct -> binary 3.1434 ms/op 3.2773 ms/op 0.96
List(Uint64Bigint) 100000 tree_backed -> binary 2.9630 ms/op 1.7482 ms/op 1.69
Vector(Root) 100000 binary -> struct 55.108 ms/op 89.496 ms/op 0.62
Vector(Root) 100000 binary -> tree_backed 59.284 ms/op 88.794 ms/op 0.67
Vector(Root) 100000 struct -> tree_backed 69.014 ms/op 96.364 ms/op 0.72
Vector(Root) 100000 tree_backed -> struct 76.398 ms/op 117.05 ms/op 0.65
Vector(Root) 100000 struct -> binary 3.1242 ms/op 3.4988 ms/op 0.89
Vector(Root) 100000 tree_backed -> binary 15.233 ms/op 17.709 ms/op 0.86
List(Validator) 100000 binary -> struct 174.06 ms/op 299.28 ms/op 0.58
List(Validator) 100000 binary -> tree_backed 505.40 ms/op 853.81 ms/op 0.59
List(Validator) 100000 struct -> tree_backed 571.98 ms/op 899.54 ms/op 0.64
List(Validator) 100000 tree_backed -> struct 305.16 ms/op 422.50 ms/op 0.72
List(Validator) 100000 struct -> binary 43.853 ms/op 50.547 ms/op 0.87
List(Validator) 100000 tree_backed -> binary 130.12 ms/op 147.88 ms/op 0.88
List(Validator-NS) 100000 binary -> struct 188.97 ms/op 300.21 ms/op 0.63
List(Validator-NS) 100000 binary -> tree_backed 249.46 ms/op 393.62 ms/op 0.63
List(Validator-NS) 100000 struct -> tree_backed 323.31 ms/op 458.50 ms/op 0.71
List(Validator-NS) 100000 tree_backed -> struct 278.59 ms/op 379.05 ms/op 0.73
List(Validator-NS) 100000 struct -> binary 42.585 ms/op 52.453 ms/op 0.81
List(Validator-NS) 100000 tree_backed -> binary 52.379 ms/op 59.265 ms/op 0.88
get epochStatuses - MutableVector 116.75 us/op 166.71 us/op 0.70
get epochStatuses - ViewDU 280.44 us/op 308.28 us/op 0.91
set epochStatuses - ListTreeView 2.5608 ms/op 3.2740 ms/op 0.78
set epochStatuses - ListTreeView - set() 632.94 us/op 682.51 us/op 0.93
set epochStatuses - ListTreeView - commit() 890.20 us/op 1.2747 ms/op 0.70
bitstring 823.91 ns/op 899.87 ns/op 0.92
bit mask 23.255 ns/op 28.024 ns/op 0.83
struct - increase slot to 1000000 2.2037 ms/op 3.1265 ms/op 0.70
UintNumberType - increase slot to 1000000 41.381 ms/op 43.264 ms/op 0.96
UintBigintType - increase slot to 1000000 691.43 ms/op 811.57 ms/op 0.85
UintBigint8 x 100000 tree_deserialize 7.4277 ms/op 8.1279 ms/op 0.91
UintBigint8 x 100000 tree_serialize 1.1347 ms/op 993.47 us/op 1.14
UintBigint16 x 100000 tree_deserialize 8.3170 ms/op 8.1308 ms/op 1.02
UintBigint16 x 100000 tree_serialize 2.1760 ms/op 2.0707 ms/op 1.05
UintBigint32 x 100000 tree_deserialize 9.7056 ms/op 9.2004 ms/op 1.05
UintBigint32 x 100000 tree_serialize 2.3106 ms/op 2.1953 ms/op 1.05
UintBigint64 x 100000 tree_deserialize 11.382 ms/op 11.967 ms/op 0.95
UintBigint64 x 100000 tree_serialize 2.9921 ms/op 2.8662 ms/op 1.04
UintBigint8 x 100000 value_deserialize 811.63 us/op 719.79 us/op 1.13
UintBigint8 x 100000 value_serialize 1.7147 ms/op 1.6411 ms/op 1.04
UintBigint16 x 100000 value_deserialize 828.05 us/op 729.44 us/op 1.14
UintBigint16 x 100000 value_serialize 1.7991 ms/op 1.6526 ms/op 1.09
UintBigint32 x 100000 value_deserialize 748.86 us/op 740.46 us/op 1.01
UintBigint32 x 100000 value_serialize 1.8803 ms/op 1.7589 ms/op 1.07
UintBigint64 x 100000 value_deserialize 795.47 us/op 823.37 us/op 0.97
UintBigint64 x 100000 value_serialize 2.1240 ms/op 1.9456 ms/op 1.09
UintBigint8 x 100000 deserialize 8.6412 ms/op 10.974 ms/op 0.79
UintBigint8 x 100000 serialize 3.6644 ms/op 2.7857 ms/op 1.32
UintBigint16 x 100000 deserialize 8.8279 ms/op 10.350 ms/op 0.85
UintBigint16 x 100000 serialize 2.2569 ms/op 2.8132 ms/op 0.80
UintBigint32 x 100000 deserialize 8.9753 ms/op 9.9617 ms/op 0.90
UintBigint32 x 100000 serialize 4.7827 ms/op 5.3599 ms/op 0.89
UintBigint64 x 100000 deserialize 6.2502 ms/op 8.3345 ms/op 0.75
UintBigint64 x 100000 serialize 2.2004 ms/op 2.4464 ms/op 0.90
UintBigint128 x 100000 deserialize 8.7845 ms/op 9.3561 ms/op 0.94
UintBigint128 x 100000 serialize 24.689 ms/op 29.068 ms/op 0.85
UintBigint256 x 100000 deserialize 16.492 ms/op 17.484 ms/op 0.94
UintBigint256 x 100000 serialize 89.587 ms/op 109.72 ms/op 0.82
Slice from Uint8Array x25000 1.8597 ms/op 2.0655 ms/op 0.90
Slice from ArrayBuffer x25000 30.830 ms/op 32.090 ms/op 0.96
Slice from ArrayBuffer x25000 + new Uint8Array 33.651 ms/op 35.265 ms/op 0.95
Copy Uint8Array 100000 iterate 1.2191 ms/op 1.4391 ms/op 0.85
Copy Uint8Array 100000 slice 167.84 us/op 330.59 us/op 0.51
Copy Uint8Array 100000 slice arrayBuffer 168.28 us/op 323.78 us/op 0.52
Uint64 deserialize 100000 - iterate Uint8Array 2.4073 ms/op 2.5650 ms/op 0.94
Uint64 deserialize 100000 - by Uint32A 2.4023 ms/op 2.4131 ms/op 1.00
Uint64 deserialize 100000 - by DataView.getUint32 x2 2.4367 ms/op 2.4739 ms/op 0.98
Uint64 deserialize 100000 - by DataView.getBigUint64 7.2995 ms/op 8.1871 ms/op 0.89
Uint64 deserialize 100000 - by byte 70.328 ms/op 80.688 ms/op 0.87

by benchmarkbot/action

@dapplion dapplion force-pushed the dapplion/test-empty-ByteListType branch from 523a137 to ebcada8 Compare April 8, 2022 12:55
@wemeetagain wemeetagain merged commit b8f7e7c into master Apr 8, 2022
@wemeetagain wemeetagain deleted the dapplion/test-empty-ByteListType branch April 8, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants