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

feat: model ListValidator ssz type #471

Merged
merged 2 commits into from
Mar 13, 2025
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 13, 2025

Motivation

  • model ListValidator ssz type, it's technically for lodestar. However we want to track its performance here
  • export necessary types so lodestar can use

Description

@twoeths twoeths added this to the v1.1 milestone Mar 13, 2025
@github-actions github-actions bot added the ssz label Mar 13, 2025
Copy link

github-actions bot commented Mar 13, 2025

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 5022bcf Previous: 2964a57 Ratio
List(Validator-NS) 100000 struct -> binary 8.1666 ms/op 35.448 ms/op 0.23
Full benchmark results
Benchmark suite Current: 5022bcf Previous: 2964a57 Ratio
digestTwoHashObjects 50023 times 48.847 ms/op 48.191 ms/op 1.01
digest2Bytes32 50023 times 54.954 ms/op 54.214 ms/op 1.01
digest 50023 times 54.188 ms/op 53.645 ms/op 1.01
input length 32 1.1910 us/op 1.1780 us/op 1.01
input length 64 1.3180 us/op 1.3080 us/op 1.01
input length 128 2.2590 us/op 2.2580 us/op 1.00
input length 256 3.3390 us/op 3.4180 us/op 0.98
input length 512 5.5510 us/op 5.6390 us/op 0.98
input length 1024 10.687 us/op 10.715 us/op 1.00
digest 1000000 times 864.13 ms/op 848.25 ms/op 1.02
hashObjectToByteArray 50023 times 1.2313 ms/op 1.2295 ms/op 1.00
byteArrayToHashObject 50023 times 1.5277 ms/op 1.5358 ms/op 0.99
digest64 200092 times 219.17 ms/op 211.96 ms/op 1.03
hash 200092 times using batchHash4UintArray64s 235.33 ms/op 233.96 ms/op 1.01
digest64HashObjects 200092 times 194.96 ms/op 191.41 ms/op 1.02
hash 200092 times using batchHash4HashObjectInputs 196.34 ms/op 199.94 ms/op 0.98
getGindicesAtDepth 3.3990 us/op 3.4530 us/op 0.98
iterateAtDepth 6.3050 us/op 6.3580 us/op 0.99
getGindexBits 373.00 ns/op 389.00 ns/op 0.96
gindexIterator 832.00 ns/op 855.00 ns/op 0.97
HashComputationLevel.push then loop 25.317 ms/op 26.048 ms/op 0.97
HashComputation[] push then loop 46.865 ms/op 46.866 ms/op 1.00
hash 2 Uint8Array 500000 times - hashtree 220.41 ms/op 214.34 ms/op 1.03
hashTwoObjects 500000 times - hashtree 211.38 ms/op 218.52 ms/op 0.97
executeHashComputations - hashtree 9.6442 ms/op 10.026 ms/op 0.96
hash 2 Uint8Array 500000 times - as-sha256 568.24 ms/op 558.97 ms/op 1.02
hashTwoObjects 500000 times - as-sha256 515.82 ms/op 509.91 ms/op 1.01
executeHashComputations - as-sha256 44.992 ms/op 47.718 ms/op 0.94
hash 2 Uint8Array 500000 times - noble 1.2050 s/op 1.2661 s/op 0.95
hashTwoObjects 500000 times - noble 1.6543 s/op 1.6863 s/op 0.98
executeHashComputations - noble 36.700 ms/op 37.515 ms/op 0.98
getHashComputations 2.2306 ms/op 2.0806 ms/op 1.07
executeHashComputations 9.6990 ms/op 10.164 ms/op 0.95
get root 15.539 ms/op 15.691 ms/op 0.99
getNodeH() x7812.5 avg hindex 12.272 us/op 12.266 us/op 1.00
getNodeH() x7812.5 index 0 7.5070 us/op 7.4980 us/op 1.00
getNodeH() x7812.5 index 7 7.5650 us/op 7.5450 us/op 1.00
getNodeH() x7812.5 index 7 with key array 6.3180 us/op 6.2780 us/op 1.01
new LeafNode() x7812.5 294.17 us/op 293.95 us/op 1.00
getHashComputations 250000 nodes 14.525 ms/op 14.643 ms/op 0.99
batchHash 250000 nodes 84.491 ms/op 85.140 ms/op 0.99
get root 250000 nodes 115.74 ms/op 117.91 ms/op 0.98
getHashComputations 500000 nodes 34.534 ms/op 27.928 ms/op 1.24
batchHash 500000 nodes 152.00 ms/op 156.26 ms/op 0.97
get root 500000 nodes 229.84 ms/op 236.40 ms/op 0.97
getHashComputations 1000000 nodes 80.186 ms/op 85.713 ms/op 0.94
batchHash 1000000 nodes 308.23 ms/op 300.79 ms/op 1.02
get root 1000000 nodes 464.95 ms/op 481.44 ms/op 0.97
multiproof - depth 15, 1 requested leaves 8.3730 us/op 7.8520 us/op 1.07
tree offset multiproof - depth 15, 1 requested leaves 19.291 us/op 17.753 us/op 1.09
compact multiproof - depth 15, 1 requested leaves 3.4280 us/op 2.9160 us/op 1.18
multiproof - depth 15, 2 requested leaves 13.184 us/op 11.322 us/op 1.16
tree offset multiproof - depth 15, 2 requested leaves 23.156 us/op 21.019 us/op 1.10
compact multiproof - depth 15, 2 requested leaves 3.1450 us/op 2.9050 us/op 1.08
multiproof - depth 15, 3 requested leaves 16.378 us/op 15.941 us/op 1.03
tree offset multiproof - depth 15, 3 requested leaves 27.855 us/op 26.862 us/op 1.04
compact multiproof - depth 15, 3 requested leaves 3.8030 us/op 3.4050 us/op 1.12
multiproof - depth 15, 4 requested leaves 21.648 us/op 20.929 us/op 1.03
tree offset multiproof - depth 15, 4 requested leaves 33.730 us/op 32.858 us/op 1.03
compact multiproof - depth 15, 4 requested leaves 4.4370 us/op 4.0610 us/op 1.09
packedRootsBytesToLeafNodes bytes 4000 offset 0 5.7700 us/op 5.4360 us/op 1.06
packedRootsBytesToLeafNodes bytes 4000 offset 1 5.6660 us/op 5.4590 us/op 1.04
packedRootsBytesToLeafNodes bytes 4000 offset 2 5.6190 us/op 5.4490 us/op 1.03
packedRootsBytesToLeafNodes bytes 4000 offset 3 5.8650 us/op 5.4520 us/op 1.08
subtreeFillToContents depth 40 count 250000 47.764 ms/op 41.170 ms/op 1.16
setRoot - gindexBitstring 21.585 ms/op 20.341 ms/op 1.06
setRoot - gindex 21.830 ms/op 21.318 ms/op 1.02
getRoot - gindexBitstring 2.6250 ms/op 2.6052 ms/op 1.01
getRoot - gindex 3.0823 ms/op 3.1824 ms/op 0.97
getHashObject then setHashObject 21.972 ms/op 21.662 ms/op 1.01
setNodeWithFn 19.944 ms/op 19.371 ms/op 1.03
getNodeAtDepth depth 0 x100000 280.09 us/op 280.28 us/op 1.00
setNodeAtDepth depth 0 x100000 2.5741 ms/op 2.4888 ms/op 1.03
getNodesAtDepth depth 0 x100000 311.57 us/op 312.87 us/op 1.00
setNodesAtDepth depth 0 x100000 764.15 us/op 770.66 us/op 0.99
getNodeAtDepth depth 1 x100000 342.85 us/op 343.29 us/op 1.00
setNodeAtDepth depth 1 x100000 8.2090 ms/op 7.8424 ms/op 1.05
getNodesAtDepth depth 1 x100000 435.99 us/op 435.90 us/op 1.00
setNodesAtDepth depth 1 x100000 7.4116 ms/op 6.6406 ms/op 1.12
getNodeAtDepth depth 2 x100000 758.83 us/op 734.68 us/op 1.03
setNodeAtDepth depth 2 x100000 15.735 ms/op 15.250 ms/op 1.03
getNodesAtDepth depth 2 x100000 16.941 ms/op 17.810 ms/op 0.95
setNodesAtDepth depth 2 x100000 24.471 ms/op 21.898 ms/op 1.12
tree.getNodesAtDepth - gindexes 9.7000 ms/op 8.3783 ms/op 1.16
tree.getNodesAtDepth - push all nodes 2.4442 ms/op 2.2336 ms/op 1.09
tree.getNodesAtDepth - navigation 311.63 us/op 311.54 us/op 1.00
tree.setNodesAtDepth - indexes 719.10 us/op 648.80 us/op 1.11
set at depth 8 709.00 ns/op 756.00 ns/op 0.94
set at depth 16 1.3290 us/op 1.1070 us/op 1.20
set at depth 32 2.3260 us/op 1.8780 us/op 1.24
iterateNodesAtDepth 8 256 14.603 us/op 13.595 us/op 1.07
getNodesAtDepth 8 256 3.7680 us/op 3.6830 us/op 1.02
iterateNodesAtDepth 16 65536 4.7518 ms/op 4.8267 ms/op 0.98
getNodesAtDepth 16 65536 2.0587 ms/op 1.8778 ms/op 1.10
iterateNodesAtDepth 32 250000 16.950 ms/op 17.000 ms/op 1.00
getNodesAtDepth 32 250000 4.9372 ms/op 4.8379 ms/op 1.02
iterateNodesAtDepth 40 250000 17.524 ms/op 16.430 ms/op 1.07
getNodesAtDepth 40 250000 6.6530 ms/op 4.7690 ms/op 1.40
250000 validators root getter 116.36 ms/op 121.31 ms/op 0.96
250000 validators batchHash() 84.743 ms/op 91.933 ms/op 0.92
250000 validators hashComputations 18.031 ms/op 14.132 ms/op 1.28
bitlist bytes to struct (120,90) 947.00 ns/op 866.00 ns/op 1.09
bitlist bytes to tree (120,90) 3.6830 us/op 3.3720 us/op 1.09
bitlist bytes to struct (2048,2048) 1.3990 us/op 1.2520 us/op 1.12
bitlist bytes to tree (2048,2048) 4.5580 us/op 4.3670 us/op 1.04
ByteListType - deserialize 8.9190 ms/op 8.0859 ms/op 1.10
BasicListType - deserialize 17.439 ms/op 15.301 ms/op 1.14
ByteListType - serialize 7.9609 ms/op 8.2118 ms/op 0.97
BasicListType - serialize 10.648 ms/op 10.480 ms/op 1.02
BasicListType - tree_convertToStruct 29.675 ms/op 25.524 ms/op 1.16
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 5.0556 ms/op 4.8269 ms/op 1.05
List[uint8, 68719476736] len 300000 ViewDU.get(i) 4.3693 ms/op 4.3764 ms/op 1.00
Array.push len 300000 empty Array - number 7.2170 ms/op 6.3275 ms/op 1.14
Array.set len 300000 from new Array - number 2.0824 ms/op 1.9045 ms/op 1.09
Array.set len 300000 - number 7.0572 ms/op 6.2262 ms/op 1.13
Uint8Array.set len 300000 490.59 us/op 454.03 us/op 1.08
Uint32Array.set len 300000 556.61 us/op 553.95 us/op 1.00
Container({a: uint8, b: uint8}) getViewDU x300000 29.288 ms/op 25.504 ms/op 1.15
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 10.509 ms/op 10.702 ms/op 0.98
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 201.52 ms/op 205.85 ms/op 0.98
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 250.89 ms/op 251.55 ms/op 1.00
List(Container) len 300000 ViewDU.get(i) 6.9643 ms/op 6.5691 ms/op 1.06
List(Container) len 300000 ViewDU.getReadonly(i) 7.0102 ms/op 6.5861 ms/op 1.06
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 39.049 ms/op 35.069 ms/op 1.11
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 5.4499 ms/op 5.9346 ms/op 0.92
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 6.5359 ms/op 6.1431 ms/op 1.06
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 6.3448 ms/op 6.1819 ms/op 1.03
Array.push len 300000 empty Array - object 6.9253 ms/op 7.2591 ms/op 0.95
Array.set len 300000 from new Array - object 2.1210 ms/op 2.4468 ms/op 0.87
Array.set len 300000 - object 6.5021 ms/op 5.9787 ms/op 1.09
cachePermanentRootStruct no cache 3.5100 us/op 3.5090 us/op 1.00
cachePermanentRootStruct with cache 215.00 ns/op 195.00 ns/op 1.10
epochParticipation len 250000 rws 7813 2.3922 ms/op 2.3071 ms/op 1.04
Deneb BeaconBlock.hashTreeRoot(), numTransaction=200 5.3326 ms/op 5.2211 ms/op 1.02
BeaconState ViewDU batchHashTreeRoot vc=200000 mod=100000 222.33 ms/op
BeaconState ViewDU batchHashTreeRoot - commit step vc=200000 mod=100000 191.49 ms/op
BeaconState ViewDU batchHashTreeRoot - hash step vc=200000 mod=100000 50.137 ms/op
BeaconState ViewDU hashTreeRoot() vc=200000 mod=100000 769.33 ms/op
BeaconState ViewDU hashTreeRoot - commit step vc=200000 mod=100000 65.929 ms/op
BeaconState ViewDU hashTreeRoot - validator tree creation vc=100000 mod=100000 297.25 ms/op
deserialize Attestation - tree 4.2660 us/op 3.7660 us/op 1.13
deserialize Attestation - struct 2.2600 us/op 2.0930 us/op 1.08
deserialize SignedAggregateAndProof - tree 5.7650 us/op 5.0610 us/op 1.14
deserialize SignedAggregateAndProof - struct 3.7180 us/op 3.0940 us/op 1.20
deserialize SyncCommitteeMessage - tree 1.6190 us/op 1.4860 us/op 1.09
deserialize SyncCommitteeMessage - struct 1.3480 us/op 1.2110 us/op 1.11
deserialize SignedContributionAndProof - tree 3.0380 us/op 3.0940 us/op 0.98
deserialize SignedContributionAndProof - struct 2.3720 us/op 2.5230 us/op 0.94
deserialize SignedBeaconBlock - tree 290.08 us/op 299.38 us/op 0.97
deserialize SignedBeaconBlock - struct 129.76 us/op 129.72 us/op 1.00
BeaconState vc 300000 - deserialize tree 632.37 ms/op 639.22 ms/op 0.99
BeaconState vc 300000 - serialize tree 116.69 ms/op 147.18 ms/op 0.79
BeaconState.historicalRoots vc 300000 - deserialize tree 888.00 ns/op 899.00 ns/op 0.99
BeaconState.historicalRoots vc 300000 - serialize tree 661.00 ns/op 660.00 ns/op 1.00
BeaconState.validators vc 300000 - deserialize tree 609.40 ms/op 601.16 ms/op 1.01
BeaconState.validators vc 300000 - serialize tree 47.423 ms/op 115.60 ms/op 0.41
BeaconState.balances vc 300000 - deserialize tree 27.821 ms/op 28.126 ms/op 0.99
BeaconState.balances vc 300000 - serialize tree 4.4365 ms/op 4.9827 ms/op 0.89
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 1.0702 ms/op 1.0802 ms/op 0.99
BeaconState.previousEpochParticipation vc 300000 - serialize tree 340.20 us/op 322.13 us/op 1.06
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 1.0118 ms/op 997.89 us/op 1.01
BeaconState.currentEpochParticipation vc 300000 - serialize tree 350.13 us/op 343.32 us/op 1.02
BeaconState.inactivityScores vc 300000 - deserialize tree 28.627 ms/op 28.075 ms/op 1.02
BeaconState.inactivityScores vc 300000 - serialize tree 4.2977 ms/op 4.2087 ms/op 1.02
hashTreeRoot Attestation - struct 14.680 us/op 13.098 us/op 1.12
hashTreeRoot Attestation - tree 8.9100 us/op 9.2590 us/op 0.96
hashTreeRoot SignedAggregateAndProof - struct 17.152 us/op 15.917 us/op 1.08
hashTreeRoot SignedAggregateAndProof - tree 13.133 us/op 13.830 us/op 0.95
hashTreeRoot SyncCommitteeMessage - struct 4.2770 us/op 3.9800 us/op 1.07
hashTreeRoot SyncCommitteeMessage - tree 3.3810 us/op 3.6140 us/op 0.94
hashTreeRoot SignedContributionAndProof - struct 9.8930 us/op 9.4900 us/op 1.04
hashTreeRoot SignedContributionAndProof - tree 9.0340 us/op 9.4880 us/op 0.95
hashTreeRoot SignedBeaconBlock - struct 811.54 us/op 840.83 us/op 0.97
hashTreeRoot SignedBeaconBlock - tree 784.09 us/op 818.69 us/op 0.96
hashTreeRoot Validator - struct 4.8120 us/op 4.8530 us/op 0.99
hashTreeRoot Validator - tree 6.9670 us/op 7.0020 us/op 1.00
BeaconState vc 300000 - hashTreeRoot tree 2.1486 s/op 2.2469 s/op 0.96
BeaconState vc 300000 - batchHashTreeRoot tree 3.9318 s/op 4.1624 s/op 0.94
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 1.0110 us/op 1.0570 us/op 0.96
BeaconState.validators vc 300000 - hashTreeRoot tree 2.3058 s/op 2.4846 s/op 0.93
BeaconState.balances vc 300000 - hashTreeRoot tree 33.321 ms/op 36.341 ms/op 0.92
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 4.2403 ms/op 4.3610 ms/op 0.97
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 4.1223 ms/op 4.3498 ms/op 0.95
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 36.782 ms/op 40.833 ms/op 0.90
hash64 x18 9.1830 us/op 10.036 us/op 0.92
hashTwoObjects x18 8.1150 us/op 8.3960 us/op 0.97
hash64 x1740 864.58 us/op 834.78 us/op 1.04
hashTwoObjects x1740 738.56 us/op 774.68 us/op 0.95
hash64 x2700000 1.2564 s/op 1.2602 s/op 1.00
hashTwoObjects x2700000 1.1473 s/op 1.1739 s/op 0.98
get_exitEpoch - ContainerType 301.00 ns/op 224.00 ns/op 1.34
get_exitEpoch - ContainerNodeStructType 297.00 ns/op 233.00 ns/op 1.27
set_exitEpoch - ContainerType 299.00 ns/op 252.00 ns/op 1.19
set_exitEpoch - ContainerNodeStructType 324.00 ns/op 249.00 ns/op 1.30
get_pubkey - ContainerType 1.1320 us/op 977.00 ns/op 1.16
get_pubkey - ContainerNodeStructType 314.00 ns/op 243.00 ns/op 1.29
hashTreeRoot - ContainerType 481.00 ns/op 412.00 ns/op 1.17
hashTreeRoot - ContainerNodeStructType 510.00 ns/op 382.00 ns/op 1.34
createProof - ContainerType 4.5870 us/op 4.0190 us/op 1.14
createProof - ContainerNodeStructType 25.040 us/op 21.618 us/op 1.16
serialize - ContainerType 1.8890 us/op 1.8050 us/op 1.05
serialize - ContainerNodeStructType 1.3800 us/op 1.5330 us/op 0.90
set_exitEpoch_and_hashTreeRoot - ContainerType 3.4300 us/op 2.7040 us/op 1.27
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 7.4330 us/op 7.8540 us/op 0.95
doBatchHashTreeRootValidators 4.0080 us/op
ContainerNodeStructViewDU hashTreeRoot 26.266 us/op
Array - for of 5.6010 us/op 5.6540 us/op 0.99
Array - for(;;) 5.4870 us/op 5.5720 us/op 0.98
basicListValue.readonlyValuesArray() 4.5726 ms/op 5.0800 ms/op 0.90
basicListValue.readonlyValuesArray() + loop all 4.4549 ms/op 5.1293 ms/op 0.87
compositeListValue.readonlyValuesArray() 31.155 ms/op 27.646 ms/op 1.13
compositeListValue.readonlyValuesArray() + loop all 32.442 ms/op 32.329 ms/op 1.00
Number64UintType - get balances list 4.4932 ms/op 4.4403 ms/op 1.01
Number64UintType - set balances list 10.018 ms/op 10.119 ms/op 0.99
Number64UintType - get and increase 10 then set 40.237 ms/op 45.073 ms/op 0.89
Number64UintType - increase 10 using applyDelta 17.328 ms/op 16.043 ms/op 1.08
Number64UintType - increase 10 using applyDeltaInBatch 17.661 ms/op 15.994 ms/op 1.10
tree_newTreeFromUint64Deltas 24.154 ms/op 22.743 ms/op 1.06
unsafeUint8ArrayToTree 34.608 ms/op 36.765 ms/op 0.94
bitLength(50) 233.00 ns/op 226.00 ns/op 1.03
bitLengthStr(50) 215.00 ns/op 216.00 ns/op 1.00
bitLength(8000) 224.00 ns/op 214.00 ns/op 1.05
bitLengthStr(8000) 262.00 ns/op 250.00 ns/op 1.05
bitLength(250000) 217.00 ns/op 222.00 ns/op 0.98
bitLengthStr(250000) 300.00 ns/op 302.00 ns/op 0.99
merkleize 32 chunks 14.792 us/op 14.142 us/op 1.05
merkleizeBlocksBytes 32 chunks 3.4370 us/op 3.3970 us/op 1.01
merkleizeBlockArray 32 chunks 6.4250 us/op 6.2950 us/op 1.02
merkleize 128 chunks 59.598 us/op 56.814 us/op 1.05
merkleizeBlocksBytes 128 chunks 7.7410 us/op 7.7320 us/op 1.00
merkleizeBlockArray 128 chunks 18.120 us/op 18.020 us/op 1.01
merkleize 512 chunks 223.99 us/op 227.01 us/op 0.99
merkleizeBlocksBytes 512 chunks 23.092 us/op 22.952 us/op 1.01
merkleizeBlockArray 512 chunks 62.844 us/op 62.405 us/op 1.01
merkleize 1024 chunks 479.07 us/op 451.31 us/op 1.06
merkleizeBlocksBytes 1024 chunks 42.971 us/op 42.934 us/op 1.00
merkleizeBlockArray 1024 chunks 123.80 us/op 119.45 us/op 1.04
floor - Math.floor (53) 1.2434 ns/op 1.2438 ns/op 1.00
floor - << 0 (53) 1.2436 ns/op 1.2530 ns/op 0.99
floor - Math.floor (512) 1.2434 ns/op 1.2439 ns/op 1.00
floor - << 0 (512) 1.2435 ns/op 1.2435 ns/op 1.00
fnIf(0) 1.5562 ns/op 1.5534 ns/op 1.00
fnSwitch(0) 2.1763 ns/op 2.1755 ns/op 1.00
fnObj(0) 1.5590 ns/op 1.5555 ns/op 1.00
fnArr(0) 1.5554 ns/op 1.5537 ns/op 1.00
fnIf(4) 2.1798 ns/op 2.1858 ns/op 1.00
fnSwitch(4) 2.1820 ns/op 2.1764 ns/op 1.00
fnObj(4) 1.5677 ns/op 1.5612 ns/op 1.00
fnArr(4) 1.5565 ns/op 1.5542 ns/op 1.00
fnIf(9) 3.1062 ns/op 3.1058 ns/op 1.00
fnSwitch(9) 2.1767 ns/op 2.1812 ns/op 1.00
fnObj(9) 1.5603 ns/op 1.5549 ns/op 1.00
fnArr(9) 1.5559 ns/op 1.5545 ns/op 1.00
Container {a,b,vec} - as struct x100000 125.50 us/op 124.53 us/op 1.01
Container {a,b,vec} - as tree x100000 559.69 us/op 559.79 us/op 1.00
Container {a,vec,b} - as struct x100000 156.37 us/op 158.01 us/op 0.99
Container {a,vec,b} - as tree x100000 561.26 us/op 560.18 us/op 1.00
get 2 props x1000000 - rawObject 311.07 us/op 312.22 us/op 1.00
get 2 props x1000000 - proxy 74.098 ms/op 74.292 ms/op 1.00
get 2 props x1000000 - customObj 315.98 us/op 311.13 us/op 1.02
Simple object binary -> struct 545.00 ns/op 1.0040 us/op 0.54
Simple object binary -> tree_backed 1.6090 us/op 2.5400 us/op 0.63
Simple object struct -> tree_backed 2.2010 us/op 2.8810 us/op 0.76
Simple object tree_backed -> struct 1.5120 us/op 2.5200 us/op 0.60
Simple object struct -> binary 860.00 ns/op 1.2450 us/op 0.69
Simple object tree_backed -> binary 1.2280 us/op 2.1880 us/op 0.56
aggregationBits binary -> struct 463.00 ns/op 732.00 ns/op 0.63
aggregationBits binary -> tree_backed 2.0440 us/op 2.8050 us/op 0.73
aggregationBits struct -> tree_backed 2.4480 us/op 3.1940 us/op 0.77
aggregationBits tree_backed -> struct 926.00 ns/op 1.2740 us/op 0.73
aggregationBits struct -> binary 685.00 ns/op 845.00 ns/op 0.81
aggregationBits tree_backed -> binary 835.00 ns/op 1.0810 us/op 0.77
List(uint8) 100000 binary -> struct 1.4889 ms/op 1.7150 ms/op 0.87
List(uint8) 100000 binary -> tree_backed 269.09 us/op 278.30 us/op 0.97
List(uint8) 100000 struct -> tree_backed 1.3946 ms/op 1.3955 ms/op 1.00
List(uint8) 100000 tree_backed -> struct 1.0925 ms/op 1.1728 ms/op 0.93
List(uint8) 100000 struct -> binary 1.0959 ms/op 1.0969 ms/op 1.00
List(uint8) 100000 tree_backed -> binary 113.80 us/op 112.54 us/op 1.01
List(uint64Number) 100000 binary -> struct 1.3545 ms/op 1.3561 ms/op 1.00
List(uint64Number) 100000 binary -> tree_backed 4.5187 ms/op 4.3720 ms/op 1.03
List(uint64Number) 100000 struct -> tree_backed 6.5514 ms/op 6.6070 ms/op 0.99
List(uint64Number) 100000 tree_backed -> struct 2.4836 ms/op 2.4500 ms/op 1.01
List(uint64Number) 100000 struct -> binary 1.5293 ms/op 1.5020 ms/op 1.02
List(uint64Number) 100000 tree_backed -> binary 1.0972 ms/op 1.1703 ms/op 0.94
List(Uint64Bigint) 100000 binary -> struct 4.1509 ms/op 4.0374 ms/op 1.03
List(Uint64Bigint) 100000 binary -> tree_backed 4.6457 ms/op 5.2455 ms/op 0.89
List(Uint64Bigint) 100000 struct -> tree_backed 7.1719 ms/op 7.1986 ms/op 1.00
List(Uint64Bigint) 100000 tree_backed -> struct 6.2769 ms/op 5.0114 ms/op 1.25
List(Uint64Bigint) 100000 struct -> binary 2.0765 ms/op 2.0950 ms/op 0.99
List(Uint64Bigint) 100000 tree_backed -> binary 1.0725 ms/op 1.0966 ms/op 0.98
Vector(Root) 100000 binary -> struct 34.583 ms/op 38.909 ms/op 0.89
Vector(Root) 100000 binary -> tree_backed 43.325 ms/op 46.085 ms/op 0.94
Vector(Root) 100000 struct -> tree_backed 52.249 ms/op 55.890 ms/op 0.93
Vector(Root) 100000 tree_backed -> struct 48.902 ms/op 55.246 ms/op 0.89
Vector(Root) 100000 struct -> binary 3.1224 ms/op 2.7101 ms/op 1.15
Vector(Root) 100000 tree_backed -> binary 6.5004 ms/op 6.1809 ms/op 1.05
List(Validator) 100000 binary -> struct 114.30 ms/op 104.35 ms/op 1.10
List(Validator) 100000 binary -> tree_backed 343.83 ms/op 345.83 ms/op 0.99
List(Validator) 100000 struct -> tree_backed 366.53 ms/op 389.22 ms/op 0.94
List(Validator) 100000 tree_backed -> struct 210.79 ms/op 219.67 ms/op 0.96
List(Validator) 100000 struct -> binary 30.976 ms/op 34.437 ms/op 0.90
List(Validator) 100000 tree_backed -> binary 110.59 ms/op 112.19 ms/op 0.99
List(Validator-NS) 100000 binary -> struct 100.81 ms/op 113.12 ms/op 0.89
List(Validator-NS) 100000 binary -> tree_backed 162.36 ms/op 141.03 ms/op 1.15
List(Validator-NS) 100000 struct -> tree_backed 184.33 ms/op 215.29 ms/op 0.86
List(Validator-NS) 100000 tree_backed -> struct 149.83 ms/op 171.48 ms/op 0.87
List(Validator-NS) 100000 struct -> binary 8.1666 ms/op 35.448 ms/op 0.23
List(Validator-NS) 100000 tree_backed -> binary 13.556 ms/op 34.537 ms/op 0.39
get epochStatuses - MutableVector 120.43 us/op 107.18 us/op 1.12
get epochStatuses - ViewDU 216.28 us/op 212.20 us/op 1.02
set epochStatuses - ListTreeView 2.1601 ms/op 2.4549 ms/op 0.88
set epochStatuses - ListTreeView - set() 469.81 us/op 477.29 us/op 0.98
set epochStatuses - ListTreeView - commit() 755.38 us/op 725.43 us/op 1.04
bitstring 515.13 ns/op 512.73 ns/op 1.00
bit mask 13.749 ns/op 14.107 ns/op 0.97
struct - increase slot to 1000000 933.36 us/op 934.39 us/op 1.00
UintNumberType - increase slot to 1000000 25.270 ms/op 28.335 ms/op 0.89
UintBigintType - increase slot to 1000000 194.77 ms/op 173.84 ms/op 1.12
UintBigint8 x 100000 tree_deserialize 6.1858 ms/op 6.6773 ms/op 0.93
UintBigint8 x 100000 tree_serialize 1.1501 ms/op 1.1365 ms/op 1.01
UintBigint16 x 100000 tree_deserialize 5.9765 ms/op 6.3632 ms/op 0.94
UintBigint16 x 100000 tree_serialize 1.4584 ms/op 1.3763 ms/op 1.06
UintBigint32 x 100000 tree_deserialize 6.0410 ms/op 6.8526 ms/op 0.88
UintBigint32 x 100000 tree_serialize 2.1227 ms/op 1.8485 ms/op 1.15
UintBigint64 x 100000 tree_deserialize 7.0666 ms/op 7.0552 ms/op 1.00
UintBigint64 x 100000 tree_serialize 1.9704 ms/op 2.4970 ms/op 0.79
UintBigint8 x 100000 value_deserialize 435.53 us/op 435.70 us/op 1.00
UintBigint8 x 100000 value_serialize 799.14 us/op 768.13 us/op 1.04
UintBigint16 x 100000 value_deserialize 474.53 us/op 468.34 us/op 1.01
UintBigint16 x 100000 value_serialize 831.15 us/op 837.08 us/op 0.99
UintBigint32 x 100000 value_deserialize 497.59 us/op 497.64 us/op 1.00
UintBigint32 x 100000 value_serialize 872.22 us/op 858.77 us/op 1.02
UintBigint64 x 100000 value_deserialize 562.23 us/op 561.82 us/op 1.00
UintBigint64 x 100000 value_serialize 1.0797 ms/op 1.0724 ms/op 1.01
UintBigint8 x 100000 deserialize 3.5700 ms/op 3.2238 ms/op 1.11
UintBigint8 x 100000 serialize 1.5950 ms/op 1.7065 ms/op 0.93
UintBigint16 x 100000 deserialize 3.7016 ms/op 3.2813 ms/op 1.13
UintBigint16 x 100000 serialize 1.6017 ms/op 1.5767 ms/op 1.02
UintBigint32 x 100000 deserialize 3.6396 ms/op 3.2861 ms/op 1.11
UintBigint32 x 100000 serialize 2.8738 ms/op 2.8243 ms/op 1.02
UintBigint64 x 100000 deserialize 4.4128 ms/op 4.1915 ms/op 1.05
UintBigint64 x 100000 serialize 1.6517 ms/op 1.6147 ms/op 1.02
UintBigint128 x 100000 deserialize 6.0437 ms/op 5.6463 ms/op 1.07
UintBigint128 x 100000 serialize 16.357 ms/op 14.695 ms/op 1.11
UintBigint256 x 100000 deserialize 9.7914 ms/op 9.2016 ms/op 1.06
UintBigint256 x 100000 serialize 44.535 ms/op 43.775 ms/op 1.02
Slice from Uint8Array x25000 1.5044 ms/op 1.4191 ms/op 1.06
Slice from ArrayBuffer x25000 16.425 ms/op 16.063 ms/op 1.02
Slice from ArrayBuffer x25000 + new Uint8Array 17.234 ms/op 17.857 ms/op 0.97
Copy Uint8Array 100000 iterate 2.6551 ms/op 2.7688 ms/op 0.96
Copy Uint8Array 100000 slice 116.55 us/op 90.082 us/op 1.29
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 112.74 us/op 91.474 us/op 1.23
Copy Buffer 100000 Uint8Array.prototype.slice.call 111.37 us/op 95.924 us/op 1.16
Copy Uint8Array 100000 slice + set 219.98 us/op 185.86 us/op 1.18
Copy Uint8Array 100000 subarray + set 109.88 us/op 92.411 us/op 1.19
Copy Uint8Array 100000 slice arrayBuffer 108.13 us/op 94.264 us/op 1.15
Uint64 deserialize 100000 - iterate Uint8Array 2.0740 ms/op 1.9740 ms/op 1.05
Uint64 deserialize 100000 - by Uint32A 2.0533 ms/op 2.0196 ms/op 1.02
Uint64 deserialize 100000 - by DataView.getUint32 x2 1.9471 ms/op 1.7868 ms/op 1.09
Uint64 deserialize 100000 - by DataView.getBigUint64 5.0661 ms/op 4.9053 ms/op 1.03
Uint64 deserialize 100000 - by byte 40.658 ms/op 40.605 ms/op 1.00

by benchmarkbot/action

@twoeths twoeths marked this pull request as ready for review March 13, 2025 07:54
@twoeths twoeths requested a review from a team as a code owner March 13, 2025 07:54
@wemeetagain wemeetagain merged commit 9432799 into master Mar 13, 2025
11 checks passed
@wemeetagain wemeetagain deleted the te/export_list_validator branch March 13, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants