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: correct comment on BitArray.getSingleTrueBit #369

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Apr 25, 2024

getSingleTrueBit() does not throw on ERROR_MORE_THAN_ONE_BIT_SET nor ERROR_NO_BIT_SET, but returns null.

This PR updates the description to match the actual behaviour.

@ensi321 ensi321 requested a review from a team as a code owner April 25, 2024 11:11
@github-actions github-actions bot added the ssz label Apr 25, 2024
Copy link

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 2d7c8d2 Previous: b3fa4f1 Ratio
digestTwoHashObjects 50023 times 47.935 ms/op 47.851 ms/op 1.00
digest64 50023 times 50.053 ms/op 49.137 ms/op 1.02
digest 50023 times 53.895 ms/op 53.708 ms/op 1.00
input length 32 1.4310 us/op 1.4510 us/op 0.99
input length 64 1.5440 us/op 1.5800 us/op 0.98
input length 128 2.5070 us/op 2.5480 us/op 0.98
input length 256 3.5840 us/op 3.6480 us/op 0.98
input length 512 5.7940 us/op 5.8480 us/op 0.99
input length 1024 11.127 us/op 11.176 us/op 1.00
digest 1000000 times 844.64 ms/op 884.66 ms/op 0.95
hashObjectToByteArray 50023 times 1.5273 ms/op 1.4305 ms/op 1.07
byteArrayToHashObject 50023 times 3.7122 ms/op 3.6768 ms/op 1.01
getGindicesAtDepth 5.1020 us/op 5.3680 us/op 0.95
iterateAtDepth 10.380 us/op 10.286 us/op 1.01
getGindexBits 541.00 ns/op 551.00 ns/op 0.98
gindexIterator 1.2310 us/op 1.2610 us/op 0.98
hash 2 Uint8Array 2250026 times - as-sha256 2.3025 s/op 2.3120 s/op 1.00
hashTwoObjects 2250026 times - as-sha256 2.2280 s/op 2.2637 s/op 0.98
hash 2 Uint8Array 2250026 times - noble 5.8043 s/op 5.8775 s/op 0.99
hashTwoObjects 2250026 times - noble 7.1337 s/op 6.8083 s/op 1.05
getNodeH() x7812.5 avg hindex 15.412 us/op 15.945 us/op 0.97
getNodeH() x7812.5 index 0 5.3460 us/op 5.2540 us/op 1.02
getNodeH() x7812.5 index 7 5.3370 us/op 5.3010 us/op 1.01
getNodeH() x7812.5 index 7 with key array 5.2350 us/op 5.2670 us/op 0.99
new LeafNode() x7812.5 192.80 us/op 368.67 us/op 0.52
multiproof - depth 15, 1 requested leaves 10.666 us/op 10.309 us/op 1.03
tree offset multiproof - depth 15, 1 requested leaves 21.064 us/op 21.676 us/op 0.97
compact multiproof - depth 15, 1 requested leaves 5.6080 us/op 5.7270 us/op 0.98
multiproof - depth 15, 2 requested leaves 13.927 us/op 14.004 us/op 0.99
tree offset multiproof - depth 15, 2 requested leaves 24.822 us/op 25.794 us/op 0.96
compact multiproof - depth 15, 2 requested leaves 3.3980 us/op 3.4700 us/op 0.98
multiproof - depth 15, 3 requested leaves 19.491 us/op 19.459 us/op 1.00
tree offset multiproof - depth 15, 3 requested leaves 33.175 us/op 33.128 us/op 1.00
compact multiproof - depth 15, 3 requested leaves 5.2880 us/op 5.8000 us/op 0.91
multiproof - depth 15, 4 requested leaves 24.840 us/op 25.362 us/op 0.98
tree offset multiproof - depth 15, 4 requested leaves 39.621 us/op 40.562 us/op 0.98
compact multiproof - depth 15, 4 requested leaves 6.4460 us/op 5.7270 us/op 1.13
packedRootsBytesToLeafNodes bytes 4000 offset 0 2.0360 us/op 2.0870 us/op 0.98
packedRootsBytesToLeafNodes bytes 4000 offset 1 2.0130 us/op 2.1110 us/op 0.95
packedRootsBytesToLeafNodes bytes 4000 offset 2 2.0230 us/op 2.1220 us/op 0.95
packedRootsBytesToLeafNodes bytes 4000 offset 3 2.0120 us/op 2.0900 us/op 0.96
subtreeFillToContents depth 40 count 250000 47.645 ms/op 46.662 ms/op 1.02
setRoot - gindexBitstring 9.4530 ms/op 9.7876 ms/op 0.97
setRoot - gindex 9.4028 ms/op 10.273 ms/op 0.92
getRoot - gindexBitstring 2.5949 ms/op 2.6755 ms/op 0.97
getRoot - gindex 3.3569 ms/op 3.4512 ms/op 0.97
getHashObject then setHashObject 10.760 ms/op 11.121 ms/op 0.97
setNodeWithFn 9.0657 ms/op 9.6828 ms/op 0.94
getNodeAtDepth depth 0 x100000 1.2020 ms/op 1.1777 ms/op 1.02
setNodeAtDepth depth 0 x100000 2.6762 ms/op 2.8003 ms/op 0.96
getNodesAtDepth depth 0 x100000 1.0842 ms/op 1.0837 ms/op 1.00
setNodesAtDepth depth 0 x100000 1.4857 ms/op 1.4843 ms/op 1.00
getNodeAtDepth depth 1 x100000 1.2085 ms/op 1.2064 ms/op 1.00
setNodeAtDepth depth 1 x100000 5.9665 ms/op 6.1920 ms/op 0.96
getNodesAtDepth depth 1 x100000 1.2351 ms/op 1.2078 ms/op 1.02
setNodesAtDepth depth 1 x100000 4.8374 ms/op 4.8789 ms/op 0.99
getNodeAtDepth depth 2 x100000 1.4868 ms/op 1.5367 ms/op 0.97
setNodeAtDepth depth 2 x100000 10.064 ms/op 10.412 ms/op 0.97
getNodesAtDepth depth 2 x100000 20.110 ms/op 19.694 ms/op 1.02
setNodesAtDepth depth 2 x100000 13.941 ms/op 16.145 ms/op 0.86
tree.getNodesAtDepth - gindexes 6.6976 ms/op 6.6925 ms/op 1.00
tree.getNodesAtDepth - push all nodes 2.3381 ms/op 2.3773 ms/op 0.98
tree.getNodesAtDepth - navigation 157.59 us/op 157.20 us/op 1.00
tree.setNodesAtDepth - indexes 396.52 us/op 395.55 us/op 1.00
set at depth 8 538.00 ns/op 549.00 ns/op 0.98
set at depth 16 676.00 ns/op 611.00 ns/op 1.11
set at depth 32 1.0620 us/op 956.00 ns/op 1.11
iterateNodesAtDepth 8 256 14.160 us/op 13.163 us/op 1.08
getNodesAtDepth 8 256 3.5690 us/op 3.3280 us/op 1.07
iterateNodesAtDepth 16 65536 4.4035 ms/op 4.2573 ms/op 1.03
getNodesAtDepth 16 65536 2.0499 ms/op 1.6210 ms/op 1.26
iterateNodesAtDepth 32 250000 16.600 ms/op 15.284 ms/op 1.09
getNodesAtDepth 32 250000 4.6452 ms/op 4.3342 ms/op 1.07
iterateNodesAtDepth 40 250000 17.181 ms/op 15.691 ms/op 1.09
getNodesAtDepth 40 250000 4.2221 ms/op 4.2621 ms/op 0.99
250k validators 7.0793 s/op 7.0731 s/op 1.00
bitlist bytes to struct (120,90) 593.00 ns/op 577.00 ns/op 1.03
bitlist bytes to tree (120,90) 2.3930 us/op 2.3610 us/op 1.01
bitlist bytes to struct (2048,2048) 1.1010 us/op 1.0500 us/op 1.05
bitlist bytes to tree (2048,2048) 3.7270 us/op 3.5650 us/op 1.05
ByteListType - deserialize 8.7768 ms/op 9.2689 ms/op 0.95
BasicListType - deserialize 7.8088 ms/op 7.7420 ms/op 1.01
ByteListType - serialize 9.2334 ms/op 9.4836 ms/op 0.97
BasicListType - serialize 10.765 ms/op 10.813 ms/op 1.00
BasicListType - tree_convertToStruct 21.593 ms/op 22.322 ms/op 0.97
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 4.4937 ms/op 4.5542 ms/op 0.99
List[uint8, 68719476736] len 300000 ViewDU.get(i) 4.1602 ms/op 4.1424 ms/op 1.00
Array.push len 300000 empty Array - number 6.7782 ms/op 7.0260 ms/op 0.96
Array.set len 300000 from new Array - number 1.7409 ms/op 1.8431 ms/op 0.94
Array.set len 300000 - number 6.3172 ms/op 6.7592 ms/op 0.93
Uint8Array.set len 300000 230.99 us/op 226.18 us/op 1.02
Uint32Array.set len 300000 324.90 us/op 336.51 us/op 0.97
Container({a: uint8, b: uint8}) getViewDU x300000 20.671 ms/op 21.046 ms/op 0.98
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 10.235 ms/op 9.8413 ms/op 1.04
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 216.02 ms/op 221.89 ms/op 0.97
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 312.60 ms/op 322.47 ms/op 0.97
List(Container) len 300000 ViewDU.get(i) 6.8753 ms/op 7.6056 ms/op 0.90
List(Container) len 300000 ViewDU.getReadonly(i) 6.7710 ms/op 7.6226 ms/op 0.89
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 36.616 ms/op 36.675 ms/op 1.00
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 5.7678 ms/op 6.1252 ms/op 0.94
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 6.6491 ms/op 6.9121 ms/op 0.96
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 6.5066 ms/op 6.8044 ms/op 0.96
Array.push len 300000 empty Array - object 6.8797 ms/op 7.3479 ms/op 0.94
Array.set len 300000 from new Array - object 2.0273 ms/op 2.0487 ms/op 0.99
Array.set len 300000 - object 6.9578 ms/op 6.9226 ms/op 1.01
cachePermanentRootStruct no cache 9.8770 us/op 9.6210 us/op 1.03
cachePermanentRootStruct with cache 264.00 ns/op 271.00 ns/op 0.97
epochParticipation len 250000 rws 7813 2.3405 ms/op 2.3512 ms/op 1.00
deserialize Attestation - tree 2.9680 us/op 3.2770 us/op 0.91
deserialize Attestation - struct 1.9860 us/op 2.3040 us/op 0.86
deserialize SignedAggregateAndProof - tree 3.7730 us/op 4.2550 us/op 0.89
deserialize SignedAggregateAndProof - struct 2.9990 us/op 3.2290 us/op 0.93
deserialize SyncCommitteeMessage - tree 1.1320 us/op 1.2950 us/op 0.87
deserialize SyncCommitteeMessage - struct 1.2160 us/op 1.4070 us/op 0.86
deserialize SignedContributionAndProof - tree 1.9580 us/op 2.1210 us/op 0.92
deserialize SignedContributionAndProof - struct 2.4360 us/op 2.9190 us/op 0.83
deserialize SignedBeaconBlock - tree 215.63 us/op 255.56 us/op 0.84
deserialize SignedBeaconBlock - struct 128.94 us/op 147.78 us/op 0.87
BeaconState vc 300000 - deserialize tree 562.76 ms/op 581.88 ms/op 0.97
BeaconState vc 300000 - serialize tree 143.25 ms/op 141.68 ms/op 1.01
BeaconState.historicalRoots vc 300000 - deserialize tree 829.00 ns/op 889.00 ns/op 0.93
BeaconState.historicalRoots vc 300000 - serialize tree 679.00 ns/op 812.00 ns/op 0.84
BeaconState.validators vc 300000 - deserialize tree 544.26 ms/op 574.35 ms/op 0.95
BeaconState.validators vc 300000 - serialize tree 104.55 ms/op 114.56 ms/op 0.91
BeaconState.balances vc 300000 - deserialize tree 19.309 ms/op 21.840 ms/op 0.88
BeaconState.balances vc 300000 - serialize tree 2.6029 ms/op 4.8497 ms/op 0.54
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 306.74 us/op 715.86 us/op 0.43
BeaconState.previousEpochParticipation vc 300000 - serialize tree 256.82 us/op 287.21 us/op 0.89
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 313.59 us/op 704.17 us/op 0.45
BeaconState.currentEpochParticipation vc 300000 - serialize tree 251.65 us/op 280.41 us/op 0.90
BeaconState.inactivityScores vc 300000 - deserialize tree 20.260 ms/op 22.396 ms/op 0.90
BeaconState.inactivityScores vc 300000 - serialize tree 3.3893 ms/op 5.5067 ms/op 0.62
hashTreeRoot Attestation - struct 31.156 us/op 34.109 us/op 0.91
hashTreeRoot Attestation - tree 18.273 us/op 18.822 us/op 0.97
hashTreeRoot SignedAggregateAndProof - struct 41.595 us/op 53.599 us/op 0.78
hashTreeRoot SignedAggregateAndProof - tree 28.214 us/op 30.071 us/op 0.94
hashTreeRoot SyncCommitteeMessage - struct 10.016 us/op 12.971 us/op 0.77
hashTreeRoot SyncCommitteeMessage - tree 6.2700 us/op 6.4260 us/op 0.98
hashTreeRoot SignedContributionAndProof - struct 28.602 us/op 33.133 us/op 0.86
hashTreeRoot SignedContributionAndProof - tree 20.361 us/op 23.043 us/op 0.88
hashTreeRoot SignedBeaconBlock - struct 2.4180 ms/op 2.8423 ms/op 0.85
hashTreeRoot SignedBeaconBlock - tree 1.6790 ms/op 1.6945 ms/op 0.99
hashTreeRoot Validator - struct 12.968 us/op 14.481 us/op 0.90
hashTreeRoot Validator - tree 11.048 us/op 12.121 us/op 0.91
BeaconState vc 300000 - hashTreeRoot tree 3.6547 s/op 3.7574 s/op 0.97
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 1.5070 us/op 1.5540 us/op 0.97
BeaconState.validators vc 300000 - hashTreeRoot tree 3.4834 s/op 3.4755 s/op 1.00
BeaconState.balances vc 300000 - hashTreeRoot tree 88.202 ms/op 91.301 ms/op 0.97
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 9.0468 ms/op 9.0191 ms/op 1.00
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 9.0365 ms/op 9.0155 ms/op 1.00
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 82.398 ms/op 81.172 ms/op 1.02
hash64 x18 19.369 us/op 19.294 us/op 1.00
hashTwoObjects x18 18.044 us/op 18.141 us/op 0.99
hash64 x1740 1.8750 ms/op 1.8265 ms/op 1.03
hashTwoObjects x1740 1.7126 ms/op 1.7048 ms/op 1.00
hash64 x2700000 2.8996 s/op 2.8388 s/op 1.02
hashTwoObjects x2700000 2.6776 s/op 2.6516 s/op 1.01
get_exitEpoch - ContainerType 225.00 ns/op 221.00 ns/op 1.02
get_exitEpoch - ContainerNodeStructType 224.00 ns/op 219.00 ns/op 1.02
set_exitEpoch - ContainerType 285.00 ns/op 253.00 ns/op 1.13
set_exitEpoch - ContainerNodeStructType 266.00 ns/op 226.00 ns/op 1.18
get_pubkey - ContainerType 1.3910 us/op 1.0390 us/op 1.34
get_pubkey - ContainerNodeStructType 265.00 ns/op 236.00 ns/op 1.12
hashTreeRoot - ContainerType 490.00 ns/op 395.00 ns/op 1.24
hashTreeRoot - ContainerNodeStructType 547.00 ns/op 444.00 ns/op 1.23
createProof - ContainerType 5.1300 us/op 4.0420 us/op 1.27
createProof - ContainerNodeStructType 26.336 us/op 21.721 us/op 1.21
serialize - ContainerType 2.1650 us/op 1.7570 us/op 1.23
serialize - ContainerNodeStructType 1.8000 us/op 1.4090 us/op 1.28
set_exitEpoch_and_hashTreeRoot - ContainerType 4.3490 us/op 4.0300 us/op 1.08
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 11.562 us/op 11.213 us/op 1.03
Array - for of 5.2530 us/op 5.1310 us/op 1.02
Array - for(;;) 4.5620 us/op 4.2150 us/op 1.08
basicListValue.readonlyValuesArray() 4.0096 ms/op 3.8867 ms/op 1.03
basicListValue.readonlyValuesArray() + loop all 4.1857 ms/op 3.9207 ms/op 1.07
compositeListValue.readonlyValuesArray() 29.026 ms/op 26.490 ms/op 1.10
compositeListValue.readonlyValuesArray() + loop all 25.090 ms/op 24.440 ms/op 1.03
Number64UintType - get balances list 4.1919 ms/op 4.1115 ms/op 1.02
Number64UintType - set balances list 10.002 ms/op 9.0388 ms/op 1.11
Number64UintType - get and increase 10 then set 38.439 ms/op 40.470 ms/op 0.95
Number64UintType - increase 10 using applyDelta 15.638 ms/op 15.202 ms/op 1.03
Number64UintType - increase 10 using applyDeltaInBatch 15.641 ms/op 15.572 ms/op 1.00
tree_newTreeFromUint64Deltas 16.073 ms/op 15.254 ms/op 1.05
unsafeUint8ArrayToTree 28.952 ms/op 28.844 ms/op 1.00
bitLength(50) 222.00 ns/op 241.00 ns/op 0.92
bitLengthStr(50) 232.00 ns/op 243.00 ns/op 0.95
bitLength(8000) 212.00 ns/op 235.00 ns/op 0.90
bitLengthStr(8000) 294.00 ns/op 283.00 ns/op 1.04
bitLength(250000) 222.00 ns/op 229.00 ns/op 0.97
bitLengthStr(250000) 318.00 ns/op 313.00 ns/op 1.02
floor - Math.floor (53) 0.46414 ns/op 0.46464 ns/op 1.00
floor - << 0 (53) 0.46733 ns/op 0.46560 ns/op 1.00
floor - Math.floor (512) 0.46390 ns/op 0.46450 ns/op 1.00
floor - << 0 (512) 0.46568 ns/op 0.46440 ns/op 1.00
fnIf(0) 1.5688 ns/op 1.5457 ns/op 1.01
fnSwitch(0) 2.4747 ns/op 2.4756 ns/op 1.00
fnObj(0) 0.46862 ns/op 0.46473 ns/op 1.01
fnArr(0) 0.46581 ns/op 0.46404 ns/op 1.00
fnIf(4) 2.1690 ns/op 2.1955 ns/op 0.99
fnSwitch(4) 2.4729 ns/op 2.4744 ns/op 1.00
fnObj(4) 0.46428 ns/op 0.47313 ns/op 0.98
fnArr(4) 0.46511 ns/op 0.46540 ns/op 1.00
fnIf(9) 3.0918 ns/op 3.1347 ns/op 0.99
fnSwitch(9) 2.4735 ns/op 2.4766 ns/op 1.00
fnObj(9) 0.46460 ns/op 0.47401 ns/op 0.98
fnArr(9) 0.46592 ns/op 0.46423 ns/op 1.00
Container {a,b,vec} - as struct x100000 46.612 us/op 46.588 us/op 1.00
Container {a,b,vec} - as tree x100000 371.43 us/op 371.98 us/op 1.00
Container {a,vec,b} - as struct x100000 77.482 us/op 77.562 us/op 1.00
Container {a,vec,b} - as tree x100000 406.21 us/op 402.50 us/op 1.01
get 2 props x1000000 - rawObject 310.28 us/op 310.13 us/op 1.00
get 2 props x1000000 - proxy 87.835 ms/op 86.910 ms/op 1.01
get 2 props x1000000 - customObj 309.50 us/op 315.71 us/op 0.98
Simple object binary -> struct 633.00 ns/op 917.00 ns/op 0.69
Simple object binary -> tree_backed 1.7370 us/op 2.4730 us/op 0.70
Simple object struct -> tree_backed 2.2330 us/op 3.1590 us/op 0.71
Simple object tree_backed -> struct 1.8320 us/op 2.5140 us/op 0.73
Simple object struct -> binary 924.00 ns/op 1.1020 us/op 0.84
Simple object tree_backed -> binary 1.6110 us/op 1.7330 us/op 0.93
aggregationBits binary -> struct 546.00 ns/op 710.00 ns/op 0.77
aggregationBits binary -> tree_backed 2.1390 us/op 2.6150 us/op 0.82
aggregationBits struct -> tree_backed 2.5490 us/op 3.0880 us/op 0.83
aggregationBits tree_backed -> struct 1.0500 us/op 1.3220 us/op 0.79
aggregationBits struct -> binary 757.00 ns/op 905.00 ns/op 0.84
aggregationBits tree_backed -> binary 919.00 ns/op 1.1280 us/op 0.81
List(uint8) 100000 binary -> struct 1.3537 ms/op 1.3747 ms/op 0.98
List(uint8) 100000 binary -> tree_backed 90.364 us/op 90.401 us/op 1.00
List(uint8) 100000 struct -> tree_backed 1.4544 ms/op 1.3246 ms/op 1.10
List(uint8) 100000 tree_backed -> struct 979.82 us/op 932.94 us/op 1.05
List(uint8) 100000 struct -> binary 1.2462 ms/op 1.2355 ms/op 1.01
List(uint8) 100000 tree_backed -> binary 81.101 us/op 80.686 us/op 1.01
List(uint64Number) 100000 binary -> struct 1.1700 ms/op 1.1572 ms/op 1.01
List(uint64Number) 100000 binary -> tree_backed 3.0029 ms/op 2.5351 ms/op 1.18
List(uint64Number) 100000 struct -> tree_backed 4.6469 ms/op 4.4143 ms/op 1.05
List(uint64Number) 100000 tree_backed -> struct 1.9915 ms/op 2.1187 ms/op 0.94
List(uint64Number) 100000 struct -> binary 1.3906 ms/op 1.5059 ms/op 0.92
List(uint64Number) 100000 tree_backed -> binary 755.14 us/op 793.15 us/op 0.95
List(Uint64Bigint) 100000 binary -> struct 3.1969 ms/op 3.4515 ms/op 0.93
List(Uint64Bigint) 100000 binary -> tree_backed 2.7913 ms/op 3.0761 ms/op 0.91
List(Uint64Bigint) 100000 struct -> tree_backed 4.5179 ms/op 5.4254 ms/op 0.83
List(Uint64Bigint) 100000 tree_backed -> struct 4.0906 ms/op 4.1767 ms/op 0.98
List(Uint64Bigint) 100000 struct -> binary 2.0451 ms/op 2.1123 ms/op 0.97
List(Uint64Bigint) 100000 tree_backed -> binary 783.63 us/op 842.06 us/op 0.93
Vector(Root) 100000 binary -> struct 27.918 ms/op 29.523 ms/op 0.95
Vector(Root) 100000 binary -> tree_backed 30.285 ms/op 29.113 ms/op 1.04
Vector(Root) 100000 struct -> tree_backed 33.299 ms/op 33.252 ms/op 1.00
Vector(Root) 100000 tree_backed -> struct 44.662 ms/op 42.989 ms/op 1.04
Vector(Root) 100000 struct -> binary 1.8910 ms/op 1.8514 ms/op 1.02
Vector(Root) 100000 tree_backed -> binary 10.944 ms/op 9.3222 ms/op 1.17
List(Validator) 100000 binary -> struct 95.739 ms/op 102.17 ms/op 0.94
List(Validator) 100000 binary -> tree_backed 278.07 ms/op 257.26 ms/op 1.08
List(Validator) 100000 struct -> tree_backed 289.37 ms/op 287.64 ms/op 1.01
List(Validator) 100000 tree_backed -> struct 199.03 ms/op 198.64 ms/op 1.00
List(Validator) 100000 struct -> binary 30.090 ms/op 30.500 ms/op 0.99
List(Validator) 100000 tree_backed -> binary 101.08 ms/op 105.35 ms/op 0.96
List(Validator-NS) 100000 binary -> struct 100.29 ms/op 98.862 ms/op 1.01
List(Validator-NS) 100000 binary -> tree_backed 157.87 ms/op 139.25 ms/op 1.13
List(Validator-NS) 100000 struct -> tree_backed 184.57 ms/op 183.57 ms/op 1.01
List(Validator-NS) 100000 tree_backed -> struct 156.79 ms/op 149.47 ms/op 1.05
List(Validator-NS) 100000 struct -> binary 30.361 ms/op 30.528 ms/op 0.99
List(Validator-NS) 100000 tree_backed -> binary 34.839 ms/op 36.453 ms/op 0.96
get epochStatuses - MutableVector 94.187 us/op 89.616 us/op 1.05
get epochStatuses - ViewDU 205.76 us/op 203.10 us/op 1.01
set epochStatuses - ListTreeView 1.4747 ms/op 1.3784 ms/op 1.07
set epochStatuses - ListTreeView - set() 440.01 us/op 430.86 us/op 1.02
set epochStatuses - ListTreeView - commit() 405.71 us/op 453.04 us/op 0.90
bitstring 645.37 ns/op 640.75 ns/op 1.01
bit mask 14.018 ns/op 14.254 ns/op 0.98
struct - increase slot to 1000000 927.63 us/op 928.01 us/op 1.00
UintNumberType - increase slot to 1000000 28.962 ms/op 28.483 ms/op 1.02
UintBigintType - increase slot to 1000000 437.37 ms/op 410.71 ms/op 1.06
UintBigint8 x 100000 tree_deserialize 5.6577 ms/op 4.6436 ms/op 1.22
UintBigint8 x 100000 tree_serialize 1.1875 ms/op 1.1855 ms/op 1.00
UintBigint16 x 100000 tree_deserialize 5.2097 ms/op 4.7244 ms/op 1.10
UintBigint16 x 100000 tree_serialize 1.1344 ms/op 1.1817 ms/op 0.96
UintBigint32 x 100000 tree_deserialize 5.6964 ms/op 4.8803 ms/op 1.17
UintBigint32 x 100000 tree_serialize 1.2041 ms/op 1.2425 ms/op 0.97
UintBigint64 x 100000 tree_deserialize 6.2914 ms/op 5.4930 ms/op 1.15
UintBigint64 x 100000 tree_serialize 1.5677 ms/op 1.6056 ms/op 0.98
UintBigint8 x 100000 value_deserialize 433.16 us/op 433.31 us/op 1.00
UintBigint8 x 100000 value_serialize 581.25 us/op 610.31 us/op 0.95
UintBigint16 x 100000 value_deserialize 464.06 us/op 464.11 us/op 1.00
UintBigint16 x 100000 value_serialize 611.52 us/op 648.77 us/op 0.94
UintBigint32 x 100000 value_deserialize 433.30 us/op 433.33 us/op 1.00
UintBigint32 x 100000 value_serialize 614.24 us/op 646.24 us/op 0.95
UintBigint64 x 100000 value_deserialize 465.09 us/op 465.28 us/op 1.00
UintBigint64 x 100000 value_serialize 792.30 us/op 827.78 us/op 0.96
UintBigint8 x 100000 deserialize 4.5192 ms/op 4.6367 ms/op 0.97
UintBigint8 x 100000 serialize 1.3994 ms/op 1.4536 ms/op 0.96
UintBigint16 x 100000 deserialize 4.6065 ms/op 4.5558 ms/op 1.01
UintBigint16 x 100000 serialize 1.4423 ms/op 1.5185 ms/op 0.95
UintBigint32 x 100000 deserialize 5.3329 ms/op 5.2553 ms/op 1.01
UintBigint32 x 100000 serialize 2.8548 ms/op 2.7999 ms/op 1.02
UintBigint64 x 100000 deserialize 3.6642 ms/op 3.4959 ms/op 1.05
UintBigint64 x 100000 serialize 1.5307 ms/op 1.4606 ms/op 1.05
UintBigint128 x 100000 deserialize 6.1817 ms/op 5.6509 ms/op 1.09
UintBigint128 x 100000 serialize 17.047 ms/op 17.287 ms/op 0.99
UintBigint256 x 100000 deserialize 10.645 ms/op 11.032 ms/op 0.96
UintBigint256 x 100000 serialize 51.232 ms/op 51.270 ms/op 1.00
Slice from Uint8Array x25000 974.55 us/op 988.61 us/op 0.99
Slice from ArrayBuffer x25000 16.834 ms/op 16.593 ms/op 1.01
Slice from ArrayBuffer x25000 + new Uint8Array 17.276 ms/op 16.509 ms/op 1.05
Copy Uint8Array 100000 iterate 805.40 us/op 792.02 us/op 1.02
Copy Uint8Array 100000 slice 86.437 us/op 93.349 us/op 0.93
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 86.168 us/op 93.326 us/op 0.92
Copy Buffer 100000 Uint8Array.prototype.slice.call 86.367 us/op 93.489 us/op 0.92
Copy Uint8Array 100000 slice + set 148.32 us/op 153.43 us/op 0.97
Copy Uint8Array 100000 subarray + set 86.290 us/op 93.468 us/op 0.92
Copy Uint8Array 100000 slice arrayBuffer 86.477 us/op 93.428 us/op 0.93
Uint64 deserialize 100000 - iterate Uint8Array 1.7514 ms/op 1.7616 ms/op 0.99
Uint64 deserialize 100000 - by Uint32A 1.7420 ms/op 1.7232 ms/op 1.01
Uint64 deserialize 100000 - by DataView.getUint32 x2 1.7171 ms/op 1.6967 ms/op 1.01
Uint64 deserialize 100000 - by DataView.getBigUint64 4.8571 ms/op 4.8091 ms/op 1.01
Uint64 deserialize 100000 - by byte 65.083 ms/op 65.105 ms/op 1.00

by benchmarkbot/action

@twoeths twoeths merged commit d7191b8 into master Apr 26, 2024
6 of 8 checks passed
@twoeths twoeths deleted the nc/fix-comment branch April 26, 2024 01:07
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.

3 participants