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

Fix createRandomValue #249

Merged
merged 1 commit into from
Mar 25, 2022
Merged

Fix createRandomValue #249

merged 1 commit into from
Mar 25, 2022

Conversation

wemeetagain
Copy link
Member

Motivation

Issue introduced in #223

@github-actions
Copy link

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 245394e Previous: b0f2533 Ratio
digestTwoHashObjects 50023 times 57.276 ms/op 57.018 ms/op 1.00
digest64 50023 times 59.860 ms/op 60.588 ms/op 0.99
digest 50023 times 59.813 ms/op 59.492 ms/op 1.01
input length 32 1.7050 us/op 1.6240 us/op 1.05
input length 64 1.8160 us/op 1.7350 us/op 1.05
input length 128 3.0810 us/op 2.9300 us/op 1.05
input length 256 4.3470 us/op 4.2690 us/op 1.02
input length 512 7.0220 us/op 6.9400 us/op 1.01
input length 1024 13.305 us/op 13.111 us/op 1.01
digest 1000000 times 1.0405 s/op 1.0480 s/op 0.99
hashObjectToByteArray 50023 times 2.2939 ms/op 2.2855 ms/op 1.00
byteArrayToHashObject 50023 times 2.8035 ms/op 2.7514 ms/op 1.02
getGindicesAtDepth 7.0380 us/op 6.9130 us/op 1.02
iterateAtDepth 14.707 us/op 14.413 us/op 1.02
getGindexBits 716.00 ns/op 676.00 ns/op 1.06
gindexIterator 1.6270 us/op 1.5610 us/op 1.04
hash 2 Uint8Array 2250026 times 2.7893 s/op 2.7632 s/op 1.01
hashTwoObjects 2250026 times 2.6269 s/op 2.5863 s/op 1.02
getNodeH() x7812.5 avg hindex 21.521 us/op 21.499 us/op 1.00
getNodeH() x7812.5 index 0 8.2600 us/op 8.2460 us/op 1.00
getNodeH() x7812.5 index 7 8.3050 us/op 8.2520 us/op 1.01
getNodeH() x7812.5 index 7 with key array 8.2460 us/op 8.2530 us/op 1.00
new LeafNode() x7812.5 163.45 us/op 149.61 us/op 1.09
packedRootsBytesToLeafNodes bytes 4000 offset 0 4.0500 us/op 3.6670 us/op 1.10
packedRootsBytesToLeafNodes bytes 4000 offset 1 4.1040 us/op 3.6900 us/op 1.11
packedRootsBytesToLeafNodes bytes 4000 offset 2 4.1830 us/op 3.8220 us/op 1.09
packedRootsBytesToLeafNodes bytes 4000 offset 3 4.1120 us/op 3.8080 us/op 1.08
subtreeFillToContents depth 40 count 250000 54.921 ms/op 56.245 ms/op 0.98
setRoot - gindexBitstring 18.510 ms/op 15.745 ms/op 1.18
setRoot - gindex 21.368 ms/op 17.834 ms/op 1.20
getRoot - gindexBitstring 3.4153 ms/op 5.1483 ms/op 0.66
getRoot - gindex 3.7453 ms/op 4.5417 ms/op 0.82
getHashObject then setHashObject 18.881 ms/op 21.654 ms/op 0.87
setNodeWithFn 17.058 ms/op 16.375 ms/op 1.04
getNodeAtDepth depth 0 x100000 2.0359 ms/op 2.0486 ms/op 0.99
setNodeAtDepth depth 0 x100000 4.9697 ms/op 4.6947 ms/op 1.06
getNodesAtDepth depth 0 x100000 1.7938 ms/op 1.8251 ms/op 0.98
setNodesAtDepth depth 0 x100000 2.3564 ms/op 2.3403 ms/op 1.01
getNodeAtDepth depth 1 x100000 2.1719 ms/op 2.1787 ms/op 1.00
setNodeAtDepth depth 1 x100000 10.596 ms/op 9.9090 ms/op 1.07
getNodesAtDepth depth 1 x100000 1.9085 ms/op 1.9641 ms/op 0.97
setNodesAtDepth depth 1 x100000 7.7805 ms/op 8.1606 ms/op 0.95
getNodeAtDepth depth 2 x100000 2.6382 ms/op 2.6309 ms/op 1.00
setNodeAtDepth depth 2 x100000 17.442 ms/op 17.614 ms/op 0.99
getNodesAtDepth depth 2 x100000 10.283 ms/op 10.242 ms/op 1.00
setNodesAtDepth depth 2 x100000 27.327 ms/op 26.939 ms/op 1.01
tree.getNodesAtDepth - gindexes 10.566 ms/op 8.9388 ms/op 1.18
tree.getNodesAtDepth - push all nodes 2.4582 ms/op 2.2306 ms/op 1.10
tree.getNodesAtDepth - navigation 335.69 us/op 335.54 us/op 1.00
tree.setNodesAtDepth - indexes 608.91 us/op 570.71 us/op 1.07
set at depth 8 1.0450 us/op 917.00 ns/op 1.14
set at depth 16 1.0330 us/op 1.0140 us/op 1.02
set at depth 32 2.1350 us/op 1.8770 us/op 1.14
iterateNodesAtDepth 8 256 22.541 us/op 22.170 us/op 1.02
getNodesAtDepth 8 256 5.5780 us/op 5.5200 us/op 1.01
iterateNodesAtDepth 16 65536 6.4898 ms/op 6.3201 ms/op 1.03
getNodesAtDepth 16 65536 2.3801 ms/op 2.2333 ms/op 1.07
iterateNodesAtDepth 32 250000 23.995 ms/op 23.650 ms/op 1.01
getNodesAtDepth 32 250000 6.7882 ms/op 6.3401 ms/op 1.07
iterateNodesAtDepth 40 250000 23.842 ms/op 23.728 ms/op 1.00
getNodesAtDepth 40 250000 7.4619 ms/op 6.8946 ms/op 1.08
250k validators 3.2258 s/op 3.0519 s/op 1.06
bitlist bytes to struct (120,90) 1.1830 us/op 1.1130 us/op 1.06
bitlist bytes to tree (120,90) 4.9870 us/op 4.7470 us/op 1.05
bitlist bytes to struct (2048,2048) 2.0600 us/op 1.9230 us/op 1.07
bitlist bytes to tree (2048,2048) 7.0630 us/op 6.6260 us/op 1.07
ByteListType - deserialize 18.942 ms/op 15.785 ms/op 1.20
BasicListType - deserialize 18.833 ms/op 17.877 ms/op 1.05
ByteListType - serialize 18.308 ms/op 17.516 ms/op 1.05
BasicListType - serialize 20.518 ms/op 18.948 ms/op 1.08
BasicListType - tree_convertToStruct 41.592 ms/op 38.093 ms/op 1.09
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 6.2669 ms/op 5.2714 ms/op 1.19
List[uint8, 68719476736] len 300000 ViewDU.get(i) 6.2291 ms/op 6.3868 ms/op 0.98
Array.push len 300000 empty Array - number 8.5184 ms/op 7.5872 ms/op 1.12
Array.set len 300000 from new Array - number 2.4688 ms/op 2.2136 ms/op 1.12
Array.set len 300000 - number 9.3240 ms/op 8.4329 ms/op 1.11
Uint8Array.set len 300000 287.63 us/op 285.42 us/op 1.01
Uint32Array.set len 300000 527.77 us/op 501.98 us/op 1.05
Container({a: uint8, b: uint8}) getViewDU x300000 48.094 ms/op 40.397 ms/op 1.19
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 15.432 ms/op 14.624 ms/op 1.06
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 393.85 ms/op 360.16 ms/op 1.09
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 467.86 ms/op 416.77 ms/op 1.12
List(Container) len 300000 ViewDU.get(i) 13.713 ms/op 11.918 ms/op 1.15
List(Container) len 300000 ViewDU.getReadonly(i) 13.419 ms/op 11.843 ms/op 1.13
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 69.124 ms/op 67.794 ms/op 1.02
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 9.8500 ms/op 8.7238 ms/op 1.13
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 12.557 ms/op 10.233 ms/op 1.23
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 12.250 ms/op 10.576 ms/op 1.16
Array.push len 300000 empty Array - object 8.5496 ms/op 7.7233 ms/op 1.11
Array.set len 300000 from new Array - object 2.7273 ms/op 2.3734 ms/op 1.15
Array.set len 300000 - object 8.6061 ms/op 7.7119 ms/op 1.12
cachePermanentRootStruct no cache 12.846 us/op 12.274 us/op 1.05
cachePermanentRootStruct with cache 469.00 ns/op 446.00 ns/op 1.05
epochParticipation len 250000 rws 7813 3.3973 ms/op 3.3698 ms/op 1.01
deserialize Attestation - tree 4.5560 us/op 4.2500 us/op 1.07
deserialize Attestation - struct 2.9720 us/op 2.7260 us/op 1.09
deserialize SignedAggregateAndProof - tree 5.1770 us/op 5.0080 us/op 1.03
deserialize SignedAggregateAndProof - struct 4.8260 us/op 4.4200 us/op 1.09
deserialize SyncCommitteeMessage - tree 1.5610 us/op 1.6850 us/op 0.93
deserialize SyncCommitteeMessage - struct 1.7000 us/op 1.5790 us/op 1.08
deserialize SignedContributionAndProof - tree 3.2850 us/op 3.0020 us/op 1.09
deserialize SignedContributionAndProof - struct 3.8970 us/op 3.5020 us/op 1.11
deserialize SignedBeaconBlock - tree 363.89 us/op 314.75 us/op 1.16
deserialize SignedBeaconBlock - struct 218.36 us/op 187.07 us/op 1.17
BeaconState vc 300000 - deserialize tree 971.42 ms/op 948.70 ms/op 1.02
BeaconState vc 300000 - serialize tree 309.21 ms/op 332.19 ms/op 0.93
BeaconState.historicalRoots vc 300000 - deserialize tree 1.1490 us/op 1.1230 us/op 1.02
BeaconState.historicalRoots vc 300000 - serialize tree 1.3270 us/op 1.3300 us/op 1.00
BeaconState.validators vc 300000 - deserialize tree 896.20 ms/op 872.87 ms/op 1.03
BeaconState.validators vc 300000 - serialize tree 241.39 ms/op 244.65 ms/op 0.99
BeaconState.balances vc 300000 - deserialize tree 40.774 ms/op 76.047 ms/op 0.54
BeaconState.balances vc 300000 - serialize tree 6.2501 ms/op 5.0855 ms/op 1.23
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 871.88 us/op 758.54 us/op 1.15
BeaconState.previousEpochParticipation vc 300000 - serialize tree 501.11 us/op 469.50 us/op 1.07
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 871.18 us/op 730.34 us/op 1.19
BeaconState.currentEpochParticipation vc 300000 - serialize tree 497.62 us/op 527.06 us/op 0.94
BeaconState.inactivityScores vc 300000 - deserialize tree 36.087 ms/op 35.257 ms/op 1.02
BeaconState.inactivityScores vc 300000 - serialize tree 7.1759 ms/op 8.7049 ms/op 0.82
hashTreeRoot Attestation - struct 49.004 us/op 53.599 us/op 0.91
hashTreeRoot Attestation - tree 22.095 us/op 24.996 us/op 0.88
hashTreeRoot SignedAggregateAndProof - struct 59.973 us/op 81.245 us/op 0.74
hashTreeRoot SignedAggregateAndProof - tree 34.361 us/op 38.518 us/op 0.89
hashTreeRoot SyncCommitteeMessage - struct 15.207 us/op 15.518 us/op 0.98
hashTreeRoot SyncCommitteeMessage - tree 7.8230 us/op 8.7150 us/op 0.90
hashTreeRoot SignedContributionAndProof - struct 43.323 us/op 43.662 us/op 0.99
hashTreeRoot SignedContributionAndProof - tree 23.050 us/op 25.787 us/op 0.89
hashTreeRoot SignedBeaconBlock - struct 3.4683 ms/op 3.4901 ms/op 0.99
hashTreeRoot SignedBeaconBlock - tree 2.4639 ms/op 2.4839 ms/op 0.99
hashTreeRoot Validator - struct 19.825 us/op 18.328 us/op 1.08
hashTreeRoot Validator - tree 16.729 us/op 16.059 us/op 1.04
BeaconState vc 300000 - hashTreeRoot tree 4.9295 s/op 5.0193 s/op 0.98
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 2.0100 us/op 2.1820 us/op 0.92
BeaconState.validators vc 300000 - hashTreeRoot tree 4.6907 s/op 4.8423 s/op 0.97
BeaconState.balances vc 300000 - hashTreeRoot tree 107.88 ms/op 114.52 ms/op 0.94
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 11.032 ms/op 12.426 ms/op 0.89
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 11.023 ms/op 12.344 ms/op 0.89
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 109.99 ms/op 115.57 ms/op 0.95
hash64 x18 23.682 us/op 26.390 us/op 0.90
hashTwoObjects x18 21.146 us/op 23.799 us/op 0.89
hash64 x1740 2.2469 ms/op 2.5092 ms/op 0.90
hashTwoObjects x1740 1.9899 ms/op 2.1972 ms/op 0.91
hash64 x2700000 3.8264 s/op 3.8782 s/op 0.99
hashTwoObjects x2700000 3.3373 s/op 3.4669 s/op 0.96
get_exitEpoch - ContainerType 464.00 ns/op 465.00 ns/op 1.00
get_exitEpoch - ContainerNodeStructType 397.00 ns/op 410.00 ns/op 0.97
set_exitEpoch - ContainerType 450.00 ns/op 451.00 ns/op 1.00
set_exitEpoch - ContainerNodeStructType 426.00 ns/op 422.00 ns/op 1.01
get_pubkey - ContainerType 1.6570 us/op 1.7670 us/op 0.94
get_pubkey - ContainerNodeStructType 421.00 ns/op 432.00 ns/op 0.97
hashTreeRoot - ContainerType 929.00 ns/op 870.00 ns/op 1.07
hashTreeRoot - ContainerNodeStructType 938.00 ns/op 925.00 ns/op 1.01
createProof - ContainerType 6.7630 us/op 7.6020 us/op 0.89
createProof - ContainerNodeStructType 32.136 us/op 36.052 us/op 0.89
serialize - ContainerType 2.6000 us/op 2.7610 us/op 0.94
serialize - ContainerNodeStructType 2.2010 us/op 2.2150 us/op 0.99
set_exitEpoch_and_hashTreeRoot - ContainerType 5.6290 us/op 6.1250 us/op 0.92
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 14.618 us/op 15.870 us/op 0.92
Array - for of 9.4490 us/op 18.189 us/op 0.52
Array - for(;;) 6.5080 us/op 16.233 us/op 0.40
basicListValue.readonlyValuesArray() 7.4087 ms/op 7.9379 ms/op 0.93
basicListValue.readonlyValuesArray() + loop all 7.7705 ms/op 6.2615 ms/op 1.24
compositeListValue.readonlyValuesArray() 45.013 ms/op 46.982 ms/op 0.96
compositeListValue.readonlyValuesArray() + loop all 42.260 ms/op 45.114 ms/op 0.94
Number64UintType - get balances list 1.5256 ms/op 1.6359 ms/op 0.93
Number64UintType - set balances list 12.455 ms/op 14.732 ms/op 0.85
Number64UintType - get and increase 10 then set 49.049 ms/op 50.813 ms/op 0.97
Number64UintType - increase 10 using applyDelta 18.496 ms/op 17.549 ms/op 1.05
Number64UintType - increase 10 using applyDeltaInBatch 18.559 ms/op 17.472 ms/op 1.06
tree_newTreeFromUint64Deltas 36.845 ms/op 34.848 ms/op 1.06
unsafeUint8ArrayToTree 50.089 ms/op 49.053 ms/op 1.02
bitLength(50) 443.00 ns/op 446.00 ns/op 0.99
bitLengthStr(50) 616.00 ns/op 668.00 ns/op 0.92
bitLength(8000) 413.00 ns/op 449.00 ns/op 0.92
bitLengthStr(8000) 761.00 ns/op 815.00 ns/op 0.93
bitLength(250000) 404.00 ns/op 454.00 ns/op 0.89
bitLengthStr(250000) 813.00 ns/op 871.00 ns/op 0.93
floor - Math.floor (53) 0.59221 ns/op 0.67017 ns/op 0.88
floor - << 0 (53) 0.59140 ns/op 0.67028 ns/op 0.88
floor - Math.floor (512) 0.59109 ns/op 0.66967 ns/op 0.88
floor - << 0 (512) 0.59131 ns/op 0.66984 ns/op 0.88
fnIf(0) 2.3632 ns/op 2.6783 ns/op 0.88
fnSwitch(0) 3.2491 ns/op 3.6811 ns/op 0.88
fnObj(0) 0.59112 ns/op 0.66963 ns/op 0.88
fnArr(0) 0.67089 ns/op 0.66984 ns/op 1.00
fnIf(4) 4.3559 ns/op 4.3508 ns/op 1.00
fnSwitch(4) 5.0256 ns/op 5.0196 ns/op 1.00
fnObj(4) 0.67038 ns/op 0.66987 ns/op 1.00
fnArr(4) 0.67016 ns/op 0.66992 ns/op 1.00
fnIf(9) 6.7040 ns/op 6.6922 ns/op 1.00
fnSwitch(9) 6.7015 ns/op 6.6924 ns/op 1.00
fnObj(9) 0.67035 ns/op 0.66984 ns/op 1.00
fnArr(9) 0.67046 ns/op 0.66977 ns/op 1.00
Container {a,b,vec} - as struct x100000 50.823 us/op 67.432 us/op 0.75
Container {a,b,vec} - as tree x100000 703.87 us/op 703.35 us/op 1.00
Container {a,vec,b} - as struct x100000 101.06 us/op 100.91 us/op 1.00
Container {a,vec,b} - as tree x100000 904.66 us/op 904.35 us/op 1.00
get 2 props x1000000 - rawObject 335.38 us/op 335.16 us/op 1.00
get 2 props x1000000 - proxy 118.08 ms/op 117.51 ms/op 1.00
get 2 props x1000000 - customObj 335.50 us/op 335.24 us/op 1.00
Simple object binary -> struct 973.00 ns/op 938.00 ns/op 1.04
Simple object binary -> tree_backed 2.6020 us/op 2.5800 us/op 1.01
Simple object struct -> tree_backed 3.4660 us/op 3.2480 us/op 1.07
Simple object tree_backed -> struct 2.8940 us/op 2.7750 us/op 1.04
Simple object struct -> binary 1.5790 us/op 1.4570 us/op 1.08
Simple object tree_backed -> binary 2.7230 us/op 2.4660 us/op 1.10
aggregationBits binary -> struct 823.00 ns/op 729.00 ns/op 1.13
aggregationBits binary -> tree_backed 2.9510 us/op 2.8200 us/op 1.05
aggregationBits struct -> tree_backed 3.9010 us/op 3.5630 us/op 1.09
aggregationBits tree_backed -> struct 1.5960 us/op 1.4440 us/op 1.11
aggregationBits struct -> binary 1.3430 us/op 1.1580 us/op 1.16
aggregationBits tree_backed -> binary 1.6430 us/op 1.4570 us/op 1.13
List(uint8) 100000 binary -> struct 2.0959 ms/op 1.8965 ms/op 1.11
List(uint8) 100000 binary -> tree_backed 215.33 us/op 184.77 us/op 1.17
List(uint8) 100000 struct -> tree_backed 2.5269 ms/op 2.3398 ms/op 1.08
List(uint8) 100000 tree_backed -> struct 1.6051 ms/op 1.5413 ms/op 1.04
List(uint8) 100000 struct -> binary 2.2410 ms/op 2.1221 ms/op 1.06
List(uint8) 100000 tree_backed -> binary 124.62 us/op 187.17 us/op 0.67
List(uint64Number) 100000 binary -> struct 1.4200 ms/op 1.6418 ms/op 0.86
List(uint64Number) 100000 binary -> tree_backed 5.0063 ms/op 4.7352 ms/op 1.06
List(uint64Number) 100000 struct -> tree_backed 8.0068 ms/op 7.8395 ms/op 1.02
List(uint64Number) 100000 tree_backed -> struct 2.8797 ms/op 3.0403 ms/op 0.95
List(uint64Number) 100000 struct -> binary 2.3627 ms/op 2.4514 ms/op 0.96
List(uint64Number) 100000 tree_backed -> binary 1.6213 ms/op 1.6361 ms/op 0.99
List(Uint64Bigint) 100000 binary -> struct 5.4535 ms/op 5.2457 ms/op 1.04
List(Uint64Bigint) 100000 binary -> tree_backed 5.8645 ms/op 4.9286 ms/op 1.19
List(Uint64Bigint) 100000 struct -> tree_backed 9.0912 ms/op 8.3135 ms/op 1.09
List(Uint64Bigint) 100000 tree_backed -> struct 6.9318 ms/op 7.9201 ms/op 0.88
List(Uint64Bigint) 100000 struct -> binary 2.7632 ms/op 3.2093 ms/op 0.86
List(Uint64Bigint) 100000 tree_backed -> binary 1.5017 ms/op 1.7333 ms/op 0.87
Vector(Root) 100000 binary -> struct 55.224 ms/op 51.076 ms/op 1.08
Vector(Root) 100000 binary -> tree_backed 54.956 ms/op 54.481 ms/op 1.01
Vector(Root) 100000 struct -> tree_backed 64.325 ms/op 66.424 ms/op 0.97
Vector(Root) 100000 tree_backed -> struct 71.063 ms/op 74.502 ms/op 0.95
Vector(Root) 100000 struct -> binary 3.0277 ms/op 2.9465 ms/op 1.03
Vector(Root) 100000 tree_backed -> binary 14.130 ms/op 14.256 ms/op 0.99
List(Validator) 100000 binary -> struct 174.34 ms/op 173.87 ms/op 1.00
List(Validator) 100000 binary -> tree_backed 473.00 ms/op 470.10 ms/op 1.01
List(Validator) 100000 struct -> tree_backed 509.57 ms/op 510.36 ms/op 1.00
List(Validator) 100000 tree_backed -> struct 276.59 ms/op 285.61 ms/op 0.97
List(Validator) 100000 struct -> binary 43.719 ms/op 43.601 ms/op 1.00
List(Validator) 100000 tree_backed -> binary 118.67 ms/op 120.39 ms/op 0.99
List(Validator-NS) 100000 binary -> struct 175.44 ms/op 182.29 ms/op 0.96
List(Validator-NS) 100000 binary -> tree_backed 246.05 ms/op 226.85 ms/op 1.08
List(Validator-NS) 100000 struct -> tree_backed 315.24 ms/op 312.08 ms/op 1.01
List(Validator-NS) 100000 tree_backed -> struct 255.32 ms/op 266.77 ms/op 0.96
List(Validator-NS) 100000 struct -> binary 43.002 ms/op 42.159 ms/op 1.02
List(Validator-NS) 100000 tree_backed -> binary 51.774 ms/op 51.160 ms/op 1.01
get epochStatuses - MutableVector 118.81 us/op 116.34 us/op 1.02
get epochStatuses - ViewDU 285.70 us/op 280.60 us/op 1.02
set epochStatuses - ListTreeView 2.4751 ms/op 2.4104 ms/op 1.03
set epochStatuses - ListTreeView - set() 606.90 us/op 607.72 us/op 1.00
set epochStatuses - ListTreeView - commit() 823.91 us/op 793.24 us/op 1.04
bitstring 825.74 ns/op 819.84 ns/op 1.01
bit mask 21.558 ns/op 21.592 ns/op 1.00
struct - increase slot to 1000000 2.1887 ms/op 2.1864 ms/op 1.00
UintNumberType - increase slot to 1000000 40.386 ms/op 41.152 ms/op 0.98
UintBigintType - increase slot to 1000000 608.66 ms/op 652.31 ms/op 0.93
UintBigint8 x 100000 tree_deserialize 6.7435 ms/op 6.6304 ms/op 1.02
UintBigint8 x 100000 tree_serialize 1.7135 ms/op 2.0936 ms/op 0.82
UintBigint16 x 100000 tree_deserialize 6.6792 ms/op 6.5388 ms/op 1.02
UintBigint16 x 100000 tree_serialize 1.7104 ms/op 1.6894 ms/op 1.01
UintBigint32 x 100000 tree_deserialize 8.0080 ms/op 7.7791 ms/op 1.03
UintBigint32 x 100000 tree_serialize 1.8910 ms/op 1.8041 ms/op 1.05
UintBigint64 x 100000 tree_deserialize 9.5009 ms/op 9.6874 ms/op 0.98
UintBigint64 x 100000 tree_serialize 2.5499 ms/op 2.4783 ms/op 1.03
UintBigint8 x 100000 value_deserialize 709.26 us/op 803.92 us/op 0.88
UintBigint8 x 100000 value_serialize 1.3821 ms/op 1.2698 ms/op 1.09
UintBigint16 x 100000 value_deserialize 832.28 us/op 845.43 us/op 0.98
UintBigint16 x 100000 value_serialize 1.4720 ms/op 1.4236 ms/op 1.03
UintBigint32 x 100000 value_deserialize 778.76 us/op 737.19 us/op 1.06
UintBigint32 x 100000 value_serialize 1.5938 ms/op 1.4112 ms/op 1.13
UintBigint64 x 100000 value_deserialize 829.74 us/op 811.27 us/op 1.02
UintBigint64 x 100000 value_serialize 1.8920 ms/op 1.5255 ms/op 1.24
UintBigint8 x 100000 deserialize 8.0881 ms/op 8.0274 ms/op 1.01
UintBigint8 x 100000 serialize 2.0871 ms/op 2.1244 ms/op 0.98
UintBigint16 x 100000 deserialize 7.7928 ms/op 8.1401 ms/op 0.96
UintBigint16 x 100000 serialize 1.9952 ms/op 2.1699 ms/op 0.92
UintBigint32 x 100000 deserialize 7.6857 ms/op 8.3656 ms/op 0.92
UintBigint32 x 100000 serialize 3.8893 ms/op 4.4088 ms/op 0.88
UintBigint64 x 100000 deserialize 5.8216 ms/op 6.3471 ms/op 0.92
UintBigint64 x 100000 serialize 2.0280 ms/op 2.2918 ms/op 0.88
UintBigint128 x 100000 deserialize 7.8025 ms/op 8.3610 ms/op 0.93
UintBigint128 x 100000 serialize 21.643 ms/op 24.100 ms/op 0.90
UintBigint256 x 100000 deserialize 15.481 ms/op 16.114 ms/op 0.96
UintBigint256 x 100000 serialize 85.928 ms/op 86.230 ms/op 1.00
Slice from Uint8Array x25000 1.6462 ms/op 1.5953 ms/op 1.03
Slice from ArrayBuffer x25000 30.198 ms/op 28.704 ms/op 1.05
Slice from ArrayBuffer x25000 + new Uint8Array 32.863 ms/op 30.397 ms/op 1.08
Copy Uint8Array 100000 iterate 1.2089 ms/op 1.0702 ms/op 1.13
Copy Uint8Array 100000 slice 150.54 us/op 115.69 us/op 1.30
Copy Uint8Array 100000 slice arrayBuffer 151.16 us/op 119.65 us/op 1.26
Uint64 deserialize 100000 - iterate Uint8Array 2.3599 ms/op 2.0481 ms/op 1.15
Uint64 deserialize 100000 - by Uint32A 2.1442 ms/op 1.9170 ms/op 1.12
Uint64 deserialize 100000 - by DataView.getUint32 x2 2.1110 ms/op 2.0935 ms/op 1.01
Uint64 deserialize 100000 - by DataView.getBigUint64 6.9664 ms/op 6.8605 ms/op 1.02
Uint64 deserialize 100000 - by byte 69.263 ms/op 69.266 ms/op 1.00

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 5c706b4 into master Mar 25, 2022
@wemeetagain wemeetagain deleted the cayman/fix-ssz.com branch March 25, 2022 15:15
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.

1 participant