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: do not rebind node if unchanged child ViewDUs #470

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 12, 2025

Motivation

Description

Closes #379

@twoeths twoeths requested a review from a team as a code owner March 12, 2025 08:58
@github-actions github-actions bot added the ssz label Mar 12, 2025
@twoeths twoeths added this to the v1.1 milestone Mar 12, 2025
Copy link

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d08ee76 Previous: 66742f0 Ratio
digestTwoHashObjects 50023 times 48.091 ms/op 48.222 ms/op 1.00
digest2Bytes32 50023 times 54.524 ms/op 54.992 ms/op 0.99
digest 50023 times 53.551 ms/op 54.116 ms/op 0.99
input length 32 1.1620 us/op 1.1750 us/op 0.99
input length 64 1.2960 us/op 1.2840 us/op 1.01
input length 128 2.2270 us/op 2.2590 us/op 0.99
input length 256 3.3400 us/op 3.3550 us/op 1.00
input length 512 5.5310 us/op 5.5060 us/op 1.00
input length 1024 10.722 us/op 10.674 us/op 1.00
digest 1000000 times 855.92 ms/op 856.13 ms/op 1.00
hashObjectToByteArray 50023 times 1.2327 ms/op 1.2288 ms/op 1.00
byteArrayToHashObject 50023 times 1.5348 ms/op 1.5668 ms/op 0.98
digest64 200092 times 212.70 ms/op 214.68 ms/op 0.99
hash 200092 times using batchHash4UintArray64s 231.29 ms/op 241.19 ms/op 0.96
digest64HashObjects 200092 times 192.64 ms/op 192.94 ms/op 1.00
hash 200092 times using batchHash4HashObjectInputs 196.06 ms/op 201.07 ms/op 0.98
getGindicesAtDepth 3.3680 us/op 3.4420 us/op 0.98
iterateAtDepth 6.3040 us/op 6.3610 us/op 0.99
getGindexBits 383.00 ns/op 362.00 ns/op 1.06
gindexIterator 873.00 ns/op 817.00 ns/op 1.07
HashComputationLevel.push then loop 26.030 ms/op 26.614 ms/op 0.98
HashComputation[] push then loop 47.801 ms/op 49.268 ms/op 0.97
hash 2 Uint8Array 500000 times - hashtree 214.51 ms/op 226.33 ms/op 0.95
hashTwoObjects 500000 times - hashtree 215.03 ms/op 219.51 ms/op 0.98
executeHashComputations - hashtree 9.4664 ms/op 10.982 ms/op 0.86
hash 2 Uint8Array 500000 times - as-sha256 552.17 ms/op 562.87 ms/op 0.98
hashTwoObjects 500000 times - as-sha256 509.19 ms/op 508.70 ms/op 1.00
executeHashComputations - as-sha256 45.255 ms/op 45.292 ms/op 1.00
hash 2 Uint8Array 500000 times - noble 1.2040 s/op 1.2128 s/op 0.99
hashTwoObjects 500000 times - noble 1.6126 s/op 1.6214 s/op 0.99
executeHashComputations - noble 37.249 ms/op 37.232 ms/op 1.00
getHashComputations 2.1600 ms/op 2.3259 ms/op 0.93
executeHashComputations 10.203 ms/op 10.151 ms/op 1.01
get root 15.379 ms/op 15.784 ms/op 0.97
getNodeH() x7812.5 avg hindex 12.045 us/op 12.416 us/op 0.97
getNodeH() x7812.5 index 0 7.5720 us/op 7.4840 us/op 1.01
getNodeH() x7812.5 index 7 7.6550 us/op 7.4470 us/op 1.03
getNodeH() x7812.5 index 7 with key array 6.3350 us/op 6.3550 us/op 1.00
new LeafNode() x7812.5 297.08 us/op 301.29 us/op 0.99
getHashComputations 250000 nodes 15.447 ms/op 14.746 ms/op 1.05
batchHash 250000 nodes 86.848 ms/op 87.475 ms/op 0.99
get root 250000 nodes 115.90 ms/op 117.51 ms/op 0.99
getHashComputations 500000 nodes 28.905 ms/op 30.366 ms/op 0.95
batchHash 500000 nodes 156.16 ms/op 155.73 ms/op 1.00
get root 500000 nodes 231.55 ms/op 236.35 ms/op 0.98
getHashComputations 1000000 nodes 95.313 ms/op 82.758 ms/op 1.15
batchHash 1000000 nodes 333.94 ms/op 368.65 ms/op 0.91
get root 1000000 nodes 467.87 ms/op 469.26 ms/op 1.00
multiproof - depth 15, 1 requested leaves 8.0770 us/op 8.0150 us/op 1.01
tree offset multiproof - depth 15, 1 requested leaves 17.358 us/op 17.841 us/op 0.97
compact multiproof - depth 15, 1 requested leaves 3.0760 us/op 3.0990 us/op 0.99
multiproof - depth 15, 2 requested leaves 11.359 us/op 11.361 us/op 1.00
tree offset multiproof - depth 15, 2 requested leaves 20.842 us/op 21.610 us/op 0.96
compact multiproof - depth 15, 2 requested leaves 3.0140 us/op 3.1000 us/op 0.97
multiproof - depth 15, 3 requested leaves 15.901 us/op 16.107 us/op 0.99
tree offset multiproof - depth 15, 3 requested leaves 26.824 us/op 28.342 us/op 0.95
compact multiproof - depth 15, 3 requested leaves 3.6450 us/op 3.7830 us/op 0.96
multiproof - depth 15, 4 requested leaves 21.150 us/op 21.079 us/op 1.00
tree offset multiproof - depth 15, 4 requested leaves 33.562 us/op 33.950 us/op 0.99
compact multiproof - depth 15, 4 requested leaves 4.2010 us/op 4.4900 us/op 0.94
packedRootsBytesToLeafNodes bytes 4000 offset 0 5.5450 us/op 5.5470 us/op 1.00
packedRootsBytesToLeafNodes bytes 4000 offset 1 5.4910 us/op 5.6800 us/op 0.97
packedRootsBytesToLeafNodes bytes 4000 offset 2 5.5120 us/op 5.5690 us/op 0.99
packedRootsBytesToLeafNodes bytes 4000 offset 3 5.5230 us/op 5.5490 us/op 1.00
subtreeFillToContents depth 40 count 250000 45.696 ms/op 47.981 ms/op 0.95
setRoot - gindexBitstring 20.701 ms/op 21.328 ms/op 0.97
setRoot - gindex 21.225 ms/op 21.917 ms/op 0.97
getRoot - gindexBitstring 2.5071 ms/op 2.6404 ms/op 0.95
getRoot - gindex 3.0751 ms/op 3.1563 ms/op 0.97
getHashObject then setHashObject 21.512 ms/op 22.657 ms/op 0.95
setNodeWithFn 20.105 ms/op 20.203 ms/op 1.00
getNodeAtDepth depth 0 x100000 281.78 us/op 280.97 us/op 1.00
setNodeAtDepth depth 0 x100000 2.5022 ms/op 2.6096 ms/op 0.96
getNodesAtDepth depth 0 x100000 313.63 us/op 312.48 us/op 1.00
setNodesAtDepth depth 0 x100000 758.62 us/op 766.38 us/op 0.99
getNodeAtDepth depth 1 x100000 341.97 us/op 342.26 us/op 1.00
setNodeAtDepth depth 1 x100000 8.1722 ms/op 8.3236 ms/op 0.98
getNodesAtDepth depth 1 x100000 435.66 us/op 437.18 us/op 1.00
setNodesAtDepth depth 1 x100000 6.6023 ms/op 6.8082 ms/op 0.97
getNodeAtDepth depth 2 x100000 923.15 us/op 747.84 us/op 1.23
setNodeAtDepth depth 2 x100000 15.294 ms/op 15.759 ms/op 0.97
getNodesAtDepth depth 2 x100000 16.154 ms/op 17.832 ms/op 0.91
setNodesAtDepth depth 2 x100000 22.010 ms/op 23.473 ms/op 0.94
tree.getNodesAtDepth - gindexes 8.4453 ms/op 10.184 ms/op 0.83
tree.getNodesAtDepth - push all nodes 2.4333 ms/op 2.4072 ms/op 1.01
tree.getNodesAtDepth - navigation 312.14 us/op 311.81 us/op 1.00
tree.setNodesAtDepth - indexes 699.80 us/op 721.20 us/op 0.97
set at depth 8 751.00 ns/op 782.00 ns/op 0.96
set at depth 16 1.1360 us/op 1.2550 us/op 0.91
set at depth 32 1.9080 us/op 2.1260 us/op 0.90
iterateNodesAtDepth 8 256 13.901 us/op 15.250 us/op 0.91
getNodesAtDepth 8 256 3.6920 us/op 4.2120 us/op 0.88
iterateNodesAtDepth 16 65536 4.6835 ms/op 5.4861 ms/op 0.85
getNodesAtDepth 16 65536 2.0402 ms/op 1.5647 ms/op 1.30
iterateNodesAtDepth 32 250000 16.926 ms/op 16.057 ms/op 1.05
getNodesAtDepth 32 250000 4.9415 ms/op 4.5628 ms/op 1.08
iterateNodesAtDepth 40 250000 18.169 ms/op 16.026 ms/op 1.13
getNodesAtDepth 40 250000 4.4598 ms/op 4.5134 ms/op 0.99
250000 validators root getter 116.87 ms/op 118.47 ms/op 0.99
250000 validators batchHash() 83.930 ms/op 89.039 ms/op 0.94
250000 validators hashComputations 13.875 ms/op 14.514 ms/op 0.96
bitlist bytes to struct (120,90) 994.00 ns/op 803.00 ns/op 1.24
bitlist bytes to tree (120,90) 3.5980 us/op 3.1120 us/op 1.16
bitlist bytes to struct (2048,2048) 1.3580 us/op 1.1780 us/op 1.15
bitlist bytes to tree (2048,2048) 4.7210 us/op 4.1770 us/op 1.13
ByteListType - deserialize 7.7524 ms/op 7.6613 ms/op 1.01
BasicListType - deserialize 16.972 ms/op 14.691 ms/op 1.16
ByteListType - serialize 7.8814 ms/op 7.6780 ms/op 1.03
BasicListType - serialize 10.656 ms/op 10.404 ms/op 1.02
BasicListType - tree_convertToStruct 30.112 ms/op 26.817 ms/op 1.12
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 5.0382 ms/op 4.7325 ms/op 1.06
List[uint8, 68719476736] len 300000 ViewDU.get(i) 4.4735 ms/op 4.3983 ms/op 1.02
Array.push len 300000 empty Array - number 6.6791 ms/op 7.0984 ms/op 0.94
Array.set len 300000 from new Array - number 2.1484 ms/op 1.9535 ms/op 1.10
Array.set len 300000 - number 6.2976 ms/op 6.4557 ms/op 0.98
Uint8Array.set len 300000 482.93 us/op 490.96 us/op 0.98
Uint32Array.set len 300000 554.11 us/op 570.53 us/op 0.97
Container({a: uint8, b: uint8}) getViewDU x300000 26.104 ms/op 25.517 ms/op 1.02
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 10.483 ms/op 10.595 ms/op 0.99
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 194.61 ms/op 212.90 ms/op 0.91
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 239.11 ms/op 251.94 ms/op 0.95
List(Container) len 300000 ViewDU.get(i) 6.6497 ms/op 7.1620 ms/op 0.93
List(Container) len 300000 ViewDU.getReadonly(i) 6.5705 ms/op 6.8957 ms/op 0.95
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 38.716 ms/op 38.732 ms/op 1.00
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 5.0031 ms/op 5.1944 ms/op 0.96
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 5.9732 ms/op 6.4012 ms/op 0.93
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 5.9958 ms/op 6.2103 ms/op 0.97
Array.push len 300000 empty Array - object 6.2212 ms/op 7.0492 ms/op 0.88
Array.set len 300000 from new Array - object 2.2173 ms/op 2.0988 ms/op 1.06
Array.set len 300000 - object 5.8463 ms/op 6.3088 ms/op 0.93
cachePermanentRootStruct no cache 3.3630 us/op 3.5280 us/op 0.95
cachePermanentRootStruct with cache 208.00 ns/op 215.00 ns/op 0.97
epochParticipation len 250000 rws 7813 2.3057 ms/op 2.4713 ms/op 0.93
Deneb BeaconBlock.hashTreeRoot(), numTransaction=200 5.1745 ms/op 5.4818 ms/op 0.94
BeaconState ViewDU hashTreeRoot() vc=200000 111.55 ms/op 114.36 ms/op 0.98
BeaconState ViewDU recursive hash - commit step vc=200000 4.4568 ms/op 4.9293 ms/op 0.90
BeaconState ViewDU validator tree creation vc=10000 38.165 ms/op 39.187 ms/op 0.97
BeaconState ViewDU batchHashTreeRoot vc=200000 99.456 ms/op 99.795 ms/op 1.00
BeaconState ViewDU hashTreeRoot - commit step vc=200000 88.767 ms/op 91.570 ms/op 0.97
BeaconState ViewDU hashTreeRoot - hash step vc=200000 16.857 ms/op 16.207 ms/op 1.04
deserialize Attestation - tree 3.6970 us/op 3.5440 us/op 1.04
deserialize Attestation - struct 1.8430 us/op 1.8600 us/op 0.99
deserialize SignedAggregateAndProof - tree 4.9130 us/op 4.7280 us/op 1.04
deserialize SignedAggregateAndProof - struct 3.0370 us/op 3.0400 us/op 1.00
deserialize SyncCommitteeMessage - tree 1.3890 us/op 1.3940 us/op 1.00
deserialize SyncCommitteeMessage - struct 1.0920 us/op 1.0370 us/op 1.05
deserialize SignedContributionAndProof - tree 2.9250 us/op 2.8810 us/op 1.02
deserialize SignedContributionAndProof - struct 2.3140 us/op 2.3670 us/op 0.98
deserialize SignedBeaconBlock - tree 284.73 us/op 277.57 us/op 1.03
deserialize SignedBeaconBlock - struct 120.53 us/op 120.75 us/op 1.00
BeaconState vc 300000 - deserialize tree 618.30 ms/op 636.97 ms/op 0.97
BeaconState vc 300000 - serialize tree 116.92 ms/op 150.68 ms/op 0.78
BeaconState.historicalRoots vc 300000 - deserialize tree 817.00 ns/op 869.00 ns/op 0.94
BeaconState.historicalRoots vc 300000 - serialize tree 662.00 ns/op 641.00 ns/op 1.03
BeaconState.validators vc 300000 - deserialize tree 556.57 ms/op 603.80 ms/op 0.92
BeaconState.validators vc 300000 - serialize tree 109.53 ms/op 101.55 ms/op 1.08
BeaconState.balances vc 300000 - deserialize tree 26.113 ms/op 27.419 ms/op 0.95
BeaconState.balances vc 300000 - serialize tree 3.9561 ms/op 4.2650 ms/op 0.93
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 854.56 us/op 957.52 us/op 0.89
BeaconState.previousEpochParticipation vc 300000 - serialize tree 332.86 us/op 335.71 us/op 0.99
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 858.58 us/op 979.31 us/op 0.88
BeaconState.currentEpochParticipation vc 300000 - serialize tree 335.28 us/op 346.11 us/op 0.97
BeaconState.inactivityScores vc 300000 - deserialize tree 27.795 ms/op 26.139 ms/op 1.06
BeaconState.inactivityScores vc 300000 - serialize tree 4.2188 ms/op 3.7034 ms/op 1.14
hashTreeRoot Attestation - struct 12.429 us/op 12.538 us/op 0.99
hashTreeRoot Attestation - tree 9.2100 us/op 9.2210 us/op 1.00
hashTreeRoot SignedAggregateAndProof - struct 17.004 us/op 15.470 us/op 1.10
hashTreeRoot SignedAggregateAndProof - tree 13.747 us/op 13.814 us/op 1.00
hashTreeRoot SyncCommitteeMessage - struct 4.2740 us/op 3.8950 us/op 1.10
hashTreeRoot SyncCommitteeMessage - tree 4.0030 us/op 3.6700 us/op 1.09
hashTreeRoot SignedContributionAndProof - struct 10.119 us/op 9.3520 us/op 1.08
hashTreeRoot SignedContributionAndProof - tree 9.3730 us/op 9.5910 us/op 0.98
hashTreeRoot SignedBeaconBlock - struct 815.09 us/op 810.91 us/op 1.01
hashTreeRoot SignedBeaconBlock - tree 812.19 us/op 815.41 us/op 1.00
hashTreeRoot Validator - struct 4.6590 us/op 4.6240 us/op 1.01
hashTreeRoot Validator - tree 7.1650 us/op 6.8680 us/op 1.04
BeaconState vc 300000 - hashTreeRoot tree 2.2327 s/op 2.2760 s/op 0.98
BeaconState vc 300000 - batchHashTreeRoot tree 4.0292 s/op 4.1719 s/op 0.97
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 1.0250 us/op 1.0290 us/op 1.00
BeaconState.validators vc 300000 - hashTreeRoot tree 2.3997 s/op 2.4439 s/op 0.98
BeaconState.balances vc 300000 - hashTreeRoot tree 34.446 ms/op 35.258 ms/op 0.98
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 4.3007 ms/op 4.3481 ms/op 0.99
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 4.2721 ms/op 4.3738 ms/op 0.98
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 34.821 ms/op 35.154 ms/op 0.99
hash64 x18 8.5090 us/op 9.2910 us/op 0.92
hashTwoObjects x18 8.0900 us/op 8.2050 us/op 0.99
hash64 x1740 779.88 us/op 845.90 us/op 0.92
hashTwoObjects x1740 742.21 us/op 754.53 us/op 0.98
hash64 x2700000 1.2136 s/op 1.3273 s/op 0.91
hashTwoObjects x2700000 1.1631 s/op 1.1687 s/op 1.00
get_exitEpoch - ContainerType 250.00 ns/op 253.00 ns/op 0.99
get_exitEpoch - ContainerNodeStructType 242.00 ns/op 241.00 ns/op 1.00
set_exitEpoch - ContainerType 263.00 ns/op 260.00 ns/op 1.01
set_exitEpoch - ContainerNodeStructType 251.00 ns/op 242.00 ns/op 1.04
get_pubkey - ContainerType 950.00 ns/op 1.0660 us/op 0.89
get_pubkey - ContainerNodeStructType 230.00 ns/op 245.00 ns/op 0.94
hashTreeRoot - ContainerType 403.00 ns/op 430.00 ns/op 0.94
hashTreeRoot - ContainerNodeStructType 375.00 ns/op 405.00 ns/op 0.93
createProof - ContainerType 3.8940 us/op 4.1840 us/op 0.93
createProof - ContainerNodeStructType 20.996 us/op 21.256 us/op 0.99
serialize - ContainerType 1.7310 us/op 1.7530 us/op 0.99
serialize - ContainerNodeStructType 1.4090 us/op 1.4820 us/op 0.95
set_exitEpoch_and_hashTreeRoot - ContainerType 2.9310 us/op 3.0160 us/op 0.97
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 7.2810 us/op 7.5180 us/op 0.97
Array - for of 5.8900 us/op 8.2010 us/op 0.72
Array - for(;;) 5.7450 us/op 8.1920 us/op 0.70
basicListValue.readonlyValuesArray() 4.1719 ms/op 4.3237 ms/op 0.96
basicListValue.readonlyValuesArray() + loop all 4.3448 ms/op 4.4085 ms/op 0.99
compositeListValue.readonlyValuesArray() 30.782 ms/op 32.724 ms/op 0.94
compositeListValue.readonlyValuesArray() + loop all 31.179 ms/op 27.708 ms/op 1.13
Number64UintType - get balances list 4.3305 ms/op 4.4544 ms/op 0.97
Number64UintType - set balances list 10.076 ms/op 10.006 ms/op 1.01
Number64UintType - get and increase 10 then set 40.818 ms/op 43.954 ms/op 0.93
Number64UintType - increase 10 using applyDelta 16.705 ms/op 16.506 ms/op 1.01
Number64UintType - increase 10 using applyDeltaInBatch 16.332 ms/op 16.997 ms/op 0.96
tree_newTreeFromUint64Deltas 22.125 ms/op 22.861 ms/op 0.97
unsafeUint8ArrayToTree 37.188 ms/op 39.401 ms/op 0.94
bitLength(50) 245.00 ns/op 267.00 ns/op 0.92
bitLengthStr(50) 225.00 ns/op 236.00 ns/op 0.95
bitLength(8000) 233.00 ns/op 237.00 ns/op 0.98
bitLengthStr(8000) 268.00 ns/op 289.00 ns/op 0.93
bitLength(250000) 234.00 ns/op 255.00 ns/op 0.92
bitLengthStr(250000) 304.00 ns/op 309.00 ns/op 0.98
merkleize 32 chunks 14.213 us/op 15.464 us/op 0.92
merkleizeBlocksBytes 32 chunks 3.4010 us/op 3.5450 us/op 0.96
merkleizeBlockArray 32 chunks 6.3380 us/op 6.6910 us/op 0.95
merkleize 128 chunks 57.441 us/op 64.735 us/op 0.89
merkleizeBlocksBytes 128 chunks 7.6770 us/op 7.8900 us/op 0.97
merkleizeBlockArray 128 chunks 17.966 us/op 18.990 us/op 0.95
merkleize 512 chunks 229.41 us/op 249.05 us/op 0.92
merkleizeBlocksBytes 512 chunks 23.076 us/op 23.294 us/op 0.99
merkleizeBlockArray 512 chunks 61.820 us/op 67.306 us/op 0.92
merkleize 1024 chunks 459.33 us/op 509.99 us/op 0.90
merkleizeBlocksBytes 1024 chunks 42.920 us/op 43.328 us/op 0.99
merkleizeBlockArray 1024 chunks 118.99 us/op 126.11 us/op 0.94
floor - Math.floor (53) 1.2434 ns/op 1.2433 ns/op 1.00
floor - << 0 (53) 1.2433 ns/op 1.2432 ns/op 1.00
floor - Math.floor (512) 1.2453 ns/op 1.2428 ns/op 1.00
floor - << 0 (512) 1.2438 ns/op 1.2430 ns/op 1.00
fnIf(0) 1.5544 ns/op 1.5554 ns/op 1.00
fnSwitch(0) 2.2168 ns/op 2.1749 ns/op 1.02
fnObj(0) 1.5555 ns/op 1.5570 ns/op 1.00
fnArr(0) 1.5616 ns/op 1.5542 ns/op 1.00
fnIf(4) 2.1762 ns/op 2.1792 ns/op 1.00
fnSwitch(4) 2.2149 ns/op 2.1850 ns/op 1.01
fnObj(4) 1.5569 ns/op 1.5601 ns/op 1.00
fnArr(4) 1.5541 ns/op 1.5547 ns/op 1.00
fnIf(9) 3.1069 ns/op 3.1152 ns/op 1.00
fnSwitch(9) 2.1774 ns/op 2.1769 ns/op 1.00
fnObj(9) 1.5555 ns/op 1.5721 ns/op 0.99
fnArr(9) 1.5548 ns/op 1.5549 ns/op 1.00
Container {a,b,vec} - as struct x100000 124.71 us/op 124.81 us/op 1.00
Container {a,b,vec} - as tree x100000 559.88 us/op 559.79 us/op 1.00
Container {a,vec,b} - as struct x100000 156.01 us/op 156.00 us/op 1.00
Container {a,vec,b} - as tree x100000 559.67 us/op 559.94 us/op 1.00
get 2 props x1000000 - rawObject 312.04 us/op 311.25 us/op 1.00
get 2 props x1000000 - proxy 73.109 ms/op 73.088 ms/op 1.00
get 2 props x1000000 - customObj 310.96 us/op 311.50 us/op 1.00
Simple object binary -> struct 950.00 ns/op 630.00 ns/op 1.51
Simple object binary -> tree_backed 2.5600 us/op 1.7150 us/op 1.49
Simple object struct -> tree_backed 2.8880 us/op 2.3660 us/op 1.22
Simple object tree_backed -> struct 2.4620 us/op 1.6440 us/op 1.50
Simple object struct -> binary 833.00 ns/op 844.00 ns/op 0.99
Simple object tree_backed -> binary 2.1250 us/op 1.4500 us/op 1.47
aggregationBits binary -> struct 918.00 ns/op 529.00 ns/op 1.74
aggregationBits binary -> tree_backed 3.5010 us/op 2.3580 us/op 1.48
aggregationBits struct -> tree_backed 3.4010 us/op 2.8000 us/op 1.21
aggregationBits tree_backed -> struct 1.2650 us/op 1.1450 us/op 1.10
aggregationBits struct -> binary 817.00 ns/op 714.00 ns/op 1.14
aggregationBits tree_backed -> binary 1.0700 us/op 1.0020 us/op 1.07
List(uint8) 100000 binary -> struct 1.7576 ms/op 1.6701 ms/op 1.05
List(uint8) 100000 binary -> tree_backed 271.14 us/op 332.27 us/op 0.82
List(uint8) 100000 struct -> tree_backed 1.3529 ms/op 1.4486 ms/op 0.93
List(uint8) 100000 tree_backed -> struct 1.2142 ms/op 1.1655 ms/op 1.04
List(uint8) 100000 struct -> binary 1.0950 ms/op 1.1043 ms/op 0.99
List(uint8) 100000 tree_backed -> binary 109.54 us/op 116.90 us/op 0.94
List(uint64Number) 100000 binary -> struct 1.2704 ms/op 1.4853 ms/op 0.86
List(uint64Number) 100000 binary -> tree_backed 4.4047 ms/op 4.3282 ms/op 1.02
List(uint64Number) 100000 struct -> tree_backed 6.5626 ms/op 6.3714 ms/op 1.03
List(uint64Number) 100000 tree_backed -> struct 2.7488 ms/op 2.5111 ms/op 1.09
List(uint64Number) 100000 struct -> binary 1.4457 ms/op 1.4900 ms/op 0.97
List(uint64Number) 100000 tree_backed -> binary 1.0290 ms/op 1.0662 ms/op 0.97
List(Uint64Bigint) 100000 binary -> struct 3.3966 ms/op 3.5885 ms/op 0.95
List(Uint64Bigint) 100000 binary -> tree_backed 4.4192 ms/op 4.6292 ms/op 0.95
List(Uint64Bigint) 100000 struct -> tree_backed 6.9086 ms/op 7.5534 ms/op 0.91
List(Uint64Bigint) 100000 tree_backed -> struct 5.4243 ms/op 5.1846 ms/op 1.05
List(Uint64Bigint) 100000 struct -> binary 2.0549 ms/op 2.1297 ms/op 0.96
List(Uint64Bigint) 100000 tree_backed -> binary 1.0381 ms/op 1.2004 ms/op 0.86
Vector(Root) 100000 binary -> struct 26.869 ms/op 36.816 ms/op 0.73
Vector(Root) 100000 binary -> tree_backed 46.341 ms/op 39.641 ms/op 1.17
Vector(Root) 100000 struct -> tree_backed 55.087 ms/op 61.130 ms/op 0.90
Vector(Root) 100000 tree_backed -> struct 35.057 ms/op 53.966 ms/op 0.65
Vector(Root) 100000 struct -> binary 3.8957 ms/op 2.7011 ms/op 1.44
Vector(Root) 100000 tree_backed -> binary 7.1873 ms/op 6.0373 ms/op 1.19
List(Validator) 100000 binary -> struct 98.930 ms/op 100.68 ms/op 0.98
List(Validator) 100000 binary -> tree_backed 356.04 ms/op 363.39 ms/op 0.98
List(Validator) 100000 struct -> tree_backed 387.34 ms/op 390.94 ms/op 0.99
List(Validator) 100000 tree_backed -> struct 224.70 ms/op 221.04 ms/op 1.02
List(Validator) 100000 struct -> binary 31.030 ms/op 28.851 ms/op 1.08
List(Validator) 100000 tree_backed -> binary 115.63 ms/op 109.09 ms/op 1.06
List(Validator-NS) 100000 binary -> struct 102.75 ms/op 115.74 ms/op 0.89
List(Validator-NS) 100000 binary -> tree_backed 155.05 ms/op 160.89 ms/op 0.96
List(Validator-NS) 100000 struct -> tree_backed 208.08 ms/op 205.54 ms/op 1.01
List(Validator-NS) 100000 tree_backed -> struct 168.21 ms/op 168.29 ms/op 1.00
List(Validator-NS) 100000 struct -> binary 30.438 ms/op 28.961 ms/op 1.05
List(Validator-NS) 100000 tree_backed -> binary 34.393 ms/op 33.940 ms/op 1.01
get epochStatuses - MutableVector 114.97 us/op 103.74 us/op 1.11
get epochStatuses - ViewDU 211.63 us/op 214.19 us/op 0.99
set epochStatuses - ListTreeView 2.1099 ms/op 2.2634 ms/op 0.93
set epochStatuses - ListTreeView - set() 446.67 us/op 473.85 us/op 0.94
set epochStatuses - ListTreeView - commit() 873.09 us/op 786.23 us/op 1.11
bitstring 512.64 ns/op 513.46 ns/op 1.00
bit mask 13.642 ns/op 13.366 ns/op 1.02
struct - increase slot to 1000000 934.04 us/op 932.47 us/op 1.00
UintNumberType - increase slot to 1000000 27.727 ms/op 28.333 ms/op 0.98
UintBigintType - increase slot to 1000000 170.60 ms/op 165.85 ms/op 1.03
UintBigint8 x 100000 tree_deserialize 5.9683 ms/op 5.6074 ms/op 1.06
UintBigint8 x 100000 tree_serialize 1.1284 ms/op 1.1341 ms/op 0.99
UintBigint16 x 100000 tree_deserialize 5.1483 ms/op 6.5552 ms/op 0.79
UintBigint16 x 100000 tree_serialize 1.3656 ms/op 1.3684 ms/op 1.00
UintBigint32 x 100000 tree_deserialize 5.6219 ms/op 5.6964 ms/op 0.99
UintBigint32 x 100000 tree_serialize 1.8594 ms/op 1.8394 ms/op 1.01
UintBigint64 x 100000 tree_deserialize 7.1524 ms/op 6.4961 ms/op 1.10
UintBigint64 x 100000 tree_serialize 2.4813 ms/op 2.5310 ms/op 0.98
UintBigint8 x 100000 value_deserialize 436.76 us/op 435.63 us/op 1.00
UintBigint8 x 100000 value_serialize 759.84 us/op 765.89 us/op 0.99
UintBigint16 x 100000 value_deserialize 466.54 us/op 467.18 us/op 1.00
UintBigint16 x 100000 value_serialize 804.94 us/op 811.71 us/op 0.99
UintBigint32 x 100000 value_deserialize 499.15 us/op 498.38 us/op 1.00
UintBigint32 x 100000 value_serialize 853.37 us/op 840.44 us/op 1.02
UintBigint64 x 100000 value_deserialize 561.17 us/op 569.45 us/op 0.99
UintBigint64 x 100000 value_serialize 1.0342 ms/op 1.0384 ms/op 1.00
UintBigint8 x 100000 deserialize 3.1551 ms/op 3.1774 ms/op 0.99
UintBigint8 x 100000 serialize 1.6828 ms/op 1.6337 ms/op 1.03
UintBigint16 x 100000 deserialize 3.4155 ms/op 3.1588 ms/op 1.08
UintBigint16 x 100000 serialize 1.6462 ms/op 1.5303 ms/op 1.08
UintBigint32 x 100000 deserialize 3.2475 ms/op 3.2186 ms/op 1.01
UintBigint32 x 100000 serialize 2.8616 ms/op 2.8126 ms/op 1.02
UintBigint64 x 100000 deserialize 4.3032 ms/op 4.2677 ms/op 1.01
UintBigint64 x 100000 serialize 1.6926 ms/op 1.6403 ms/op 1.03
UintBigint128 x 100000 deserialize 5.5866 ms/op 5.8758 ms/op 0.95
UintBigint128 x 100000 serialize 14.700 ms/op 14.768 ms/op 1.00
UintBigint256 x 100000 deserialize 8.8871 ms/op 9.4738 ms/op 0.94
UintBigint256 x 100000 serialize 43.927 ms/op 43.153 ms/op 1.02
Slice from Uint8Array x25000 1.5164 ms/op 1.2839 ms/op 1.18
Slice from ArrayBuffer x25000 16.236 ms/op 16.348 ms/op 0.99
Slice from ArrayBuffer x25000 + new Uint8Array 15.370 ms/op 16.419 ms/op 0.94
Copy Uint8Array 100000 iterate 2.6851 ms/op 2.7738 ms/op 0.97
Copy Uint8Array 100000 slice 130.60 us/op 96.018 us/op 1.36
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 131.16 us/op 94.250 us/op 1.39
Copy Buffer 100000 Uint8Array.prototype.slice.call 131.01 us/op 95.908 us/op 1.37
Copy Uint8Array 100000 slice + set 266.15 us/op 190.59 us/op 1.40
Copy Uint8Array 100000 subarray + set 131.97 us/op 92.284 us/op 1.43
Copy Uint8Array 100000 slice arrayBuffer 135.30 us/op 95.399 us/op 1.42
Uint64 deserialize 100000 - iterate Uint8Array 2.0964 ms/op 1.8975 ms/op 1.10
Uint64 deserialize 100000 - by Uint32A 2.0546 ms/op 1.7809 ms/op 1.15
Uint64 deserialize 100000 - by DataView.getUint32 x2 2.0959 ms/op 1.8517 ms/op 1.13
Uint64 deserialize 100000 - by DataView.getBigUint64 5.4095 ms/op 4.7695 ms/op 1.13
Uint64 deserialize 100000 - by byte 41.580 ms/op 40.752 ms/op 1.02

by benchmarkbot/action

@wemeetagain wemeetagain merged commit ab23b30 into master Mar 12, 2025
11 checks passed
@wemeetagain wemeetagain deleted the te/do_not_rebind_unchanged_nodes branch March 12, 2025 13:35
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.

ViewDU container rebinds node with read-only operations
2 participants