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: relax BitArray#intersectValues types #339

Merged
merged 3 commits into from
Feb 10, 2024

Conversation

wemeetagain
Copy link
Member

Motivation

  • Experimentation in lodestar

Description

  • intersectValues was needlessly strict, requiring an Array rather than something merely ArrayLike, like a TypedArray.

@wemeetagain wemeetagain requested a review from a team as a code owner February 9, 2024 21:02
@github-actions github-actions bot added the ssz label Feb 9, 2024
@github-actions github-actions bot added the CI label Feb 9, 2024
Copy link

github-actions bot commented Feb 9, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: db83a5a Previous: 93ab30e Ratio
getNodeH() x7812.5 avg hindex 14.597 us/op 1.2769 ms/op 0.01
new LeafNode() x7812.5 118.45 us/op 366.90 us/op 0.32
Container({a: uint8, b: uint8}) getViewDU x300000 19.815 ms/op 99.369 ms/op 0.20
struct - increase slot to 1000000 927.51 us/op 3.1197 ms/op 0.30
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 92.282 us/op 322.71 us/op 0.29
Copy Buffer 100000 Uint8Array.prototype.slice.call 90.960 us/op 420.80 us/op 0.22
Copy Uint8Array 100000 slice + set 163.30 us/op 762.08 us/op 0.21
Copy Uint8Array 100000 subarray + set 91.470 us/op 415.04 us/op 0.22
Copy Uint8Array 100000 slice arrayBuffer 94.012 us/op 437.70 us/op 0.21
Full benchmark results
Benchmark suite Current: db83a5a Previous: 93ab30e Ratio
digestTwoHashObjects 50023 times 47.805 ms/op 77.736 ms/op 0.61
digest64 50023 times 49.228 ms/op 80.273 ms/op 0.61
digest 50023 times 49.376 ms/op 80.084 ms/op 0.62
input length 32 1.1590 us/op 1.8860 us/op 0.61
input length 64 1.2620 us/op 2.0890 us/op 0.60
input length 128 2.2200 us/op 3.5690 us/op 0.62
input length 256 3.3290 us/op 5.3480 us/op 0.62
input length 512 5.5010 us/op 8.7080 us/op 0.63
input length 1024 10.782 us/op 17.761 us/op 0.61
digest 1000000 times 790.80 ms/op 1.3646 s/op 0.58
hashObjectToByteArray 50023 times 1.4306 ms/op 2.7661 ms/op 0.52
byteArrayToHashObject 50023 times 1.7324 ms/op 3.6089 ms/op 0.48
getGindicesAtDepth 4.1380 us/op 7.1790 us/op 0.58
iterateAtDepth 8.5400 us/op 15.508 us/op 0.55
getGindexBits 423.00 ns/op 690.00 ns/op 0.61
gindexIterator 991.00 ns/op 1.4860 us/op 0.67
hash 2 Uint8Array 2250026 times - as-sha256 2.2658 s/op 3.5565 s/op 0.64
hashTwoObjects 2250026 times - as-sha256 2.1533 s/op 3.3333 s/op 0.65
hash 2 Uint8Array 2250026 times - noble 5.0108 s/op 9.8489 s/op 0.51
hashTwoObjects 2250026 times - noble 6.9467 s/op 12.543 s/op 0.55
getNodeH() x7812.5 avg hindex 14.597 us/op 1.2769 ms/op 0.01
getNodeH() x7812.5 index 0 5.1640 us/op 9.1970 us/op 0.56
getNodeH() x7812.5 index 7 5.1330 us/op 8.1920 us/op 0.63
getNodeH() x7812.5 index 7 with key array 5.1030 us/op 8.1540 us/op 0.63
new LeafNode() x7812.5 118.45 us/op 366.90 us/op 0.32
multiproof - depth 15, 1 requested leaves 9.3320 us/op 17.320 us/op 0.54
tree offset multiproof - depth 15, 1 requested leaves 21.230 us/op 38.051 us/op 0.56
compact multiproof - depth 15, 1 requested leaves 5.5780 us/op 10.558 us/op 0.53
multiproof - depth 15, 2 requested leaves 12.834 us/op 23.424 us/op 0.55
tree offset multiproof - depth 15, 2 requested leaves 24.409 us/op 41.192 us/op 0.59
compact multiproof - depth 15, 2 requested leaves 3.4600 us/op 6.4190 us/op 0.54
multiproof - depth 15, 3 requested leaves 17.942 us/op 31.687 us/op 0.57
tree offset multiproof - depth 15, 3 requested leaves 31.325 us/op 57.318 us/op 0.55
compact multiproof - depth 15, 3 requested leaves 4.7410 us/op 10.429 us/op 0.45
multiproof - depth 15, 4 requested leaves 23.885 us/op 43.026 us/op 0.56
tree offset multiproof - depth 15, 4 requested leaves 39.157 us/op 69.698 us/op 0.56
compact multiproof - depth 15, 4 requested leaves 5.4580 us/op 12.176 us/op 0.45
packedRootsBytesToLeafNodes bytes 4000 offset 0 2.0360 us/op 3.9110 us/op 0.52
packedRootsBytesToLeafNodes bytes 4000 offset 1 2.0420 us/op 3.8410 us/op 0.53
packedRootsBytesToLeafNodes bytes 4000 offset 2 2.0310 us/op 3.9350 us/op 0.52
packedRootsBytesToLeafNodes bytes 4000 offset 3 2.0340 us/op 4.0590 us/op 0.50
subtreeFillToContents depth 40 count 250000 44.413 ms/op 107.79 ms/op 0.41
setRoot - gindexBitstring 9.1647 ms/op 16.654 ms/op 0.55
setRoot - gindex 9.0006 ms/op 19.115 ms/op 0.47
getRoot - gindexBitstring 2.3002 ms/op 4.2727 ms/op 0.54
getRoot - gindex 3.2185 ms/op 5.5907 ms/op 0.58
getHashObject then setHashObject 9.5080 ms/op 21.313 ms/op 0.45
setNodeWithFn 8.0765 ms/op 17.625 ms/op 0.46
getNodeAtDepth depth 0 x100000 1.1501 ms/op 1.9777 ms/op 0.58
setNodeAtDepth depth 0 x100000 2.3622 ms/op 4.8319 ms/op 0.49
getNodesAtDepth depth 0 x100000 1.0838 ms/op 1.7399 ms/op 0.62
setNodesAtDepth depth 0 x100000 1.4866 ms/op 2.2933 ms/op 0.65
getNodeAtDepth depth 1 x100000 1.2063 ms/op 1.9680 ms/op 0.61
setNodeAtDepth depth 1 x100000 5.1796 ms/op 10.322 ms/op 0.50
getNodesAtDepth depth 1 x100000 1.2084 ms/op 1.8683 ms/op 0.65
setNodesAtDepth depth 1 x100000 4.3909 ms/op 8.1607 ms/op 0.54
getNodeAtDepth depth 2 x100000 1.4848 ms/op 2.6263 ms/op 0.57
setNodeAtDepth depth 2 x100000 9.1091 ms/op 19.062 ms/op 0.48
getNodesAtDepth depth 2 x100000 19.567 ms/op 34.638 ms/op 0.56
setNodesAtDepth depth 2 x100000 14.773 ms/op 27.830 ms/op 0.53
tree.getNodesAtDepth - gindexes 6.3007 ms/op 8.4481 ms/op 0.75
tree.getNodesAtDepth - push all nodes 1.7998 ms/op 3.0091 ms/op 0.60
tree.getNodesAtDepth - navigation 155.56 us/op 198.33 us/op 0.78
tree.setNodesAtDepth - indexes 359.39 us/op 612.82 us/op 0.59
set at depth 8 480.00 ns/op 951.00 ns/op 0.50
set at depth 16 617.00 ns/op 1.3380 us/op 0.46
set at depth 32 956.00 ns/op 2.0050 us/op 0.48
iterateNodesAtDepth 8 256 13.392 us/op 24.471 us/op 0.55
getNodesAtDepth 8 256 3.3960 us/op 5.8460 us/op 0.58
iterateNodesAtDepth 16 65536 4.1952 ms/op 7.5203 ms/op 0.56
getNodesAtDepth 16 65536 1.6076 ms/op 2.5382 ms/op 0.63
iterateNodesAtDepth 32 250000 15.444 ms/op 28.518 ms/op 0.54
getNodesAtDepth 32 250000 4.2309 ms/op 7.1179 ms/op 0.59
iterateNodesAtDepth 40 250000 17.117 ms/op 27.004 ms/op 0.63
getNodesAtDepth 40 250000 4.2265 ms/op 7.3968 ms/op 0.57
250k validators 7.1577 s/op 13.348 s/op 0.54
bitlist bytes to struct (120,90) 571.00 ns/op 1.1060 us/op 0.52
bitlist bytes to tree (120,90) 2.3500 us/op 4.2590 us/op 0.55
bitlist bytes to struct (2048,2048) 984.00 ns/op 1.9560 us/op 0.50
bitlist bytes to tree (2048,2048) 3.5910 us/op 7.4190 us/op 0.48
ByteListType - deserialize 8.7282 ms/op 18.320 ms/op 0.48
BasicListType - deserialize 7.7821 ms/op 14.349 ms/op 0.54
ByteListType - serialize 7.7434 ms/op 17.992 ms/op 0.43
BasicListType - serialize 10.159 ms/op 21.036 ms/op 0.48
BasicListType - tree_convertToStruct 21.643 ms/op 39.850 ms/op 0.54
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 4.1670 ms/op 7.3504 ms/op 0.57
List[uint8, 68719476736] len 300000 ViewDU.get(i) 4.1443 ms/op 6.7517 ms/op 0.61
Array.push len 300000 empty Array - number 6.0627 ms/op 10.950 ms/op 0.55
Array.set len 300000 from new Array - number 1.6818 ms/op 2.5240 ms/op 0.67
Array.set len 300000 - number 5.8367 ms/op 8.8973 ms/op 0.66
Uint8Array.set len 300000 213.05 us/op 348.57 us/op 0.61
Uint32Array.set len 300000 292.41 us/op 418.02 us/op 0.70
Container({a: uint8, b: uint8}) getViewDU x300000 19.815 ms/op 99.369 ms/op 0.20
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 9.4334 ms/op 22.769 ms/op 0.41
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 250.77 ms/op 716.64 ms/op 0.35
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 284.94 ms/op 573.44 ms/op 0.50
List(Container) len 300000 ViewDU.get(i) 6.9244 ms/op 12.899 ms/op 0.54
List(Container) len 300000 ViewDU.getReadonly(i) 6.5811 ms/op 12.332 ms/op 0.53
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 34.259 ms/op 70.553 ms/op 0.49
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 5.9535 ms/op 9.1653 ms/op 0.65
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 6.1690 ms/op 10.409 ms/op 0.59
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 6.0198 ms/op 10.990 ms/op 0.55
Array.push len 300000 empty Array - object 6.2582 ms/op 10.815 ms/op 0.58
Array.set len 300000 from new Array - object 1.9057 ms/op 3.3966 ms/op 0.56
Array.set len 300000 - object 5.7346 ms/op 9.9895 ms/op 0.57
cachePermanentRootStruct no cache 8.9720 us/op 16.466 us/op 0.54
cachePermanentRootStruct with cache 223.00 ns/op 371.00 ns/op 0.60
epochParticipation len 250000 rws 7813 2.3374 ms/op 4.3912 ms/op 0.53
deserialize Attestation - tree 2.9370 us/op 6.3710 us/op 0.46
deserialize Attestation - struct 2.0650 us/op 4.1660 us/op 0.50
deserialize SignedAggregateAndProof - tree 3.7190 us/op 8.6410 us/op 0.43
deserialize SignedAggregateAndProof - struct 3.0530 us/op 6.3330 us/op 0.48
deserialize SyncCommitteeMessage - tree 1.0970 us/op 1.8900 us/op 0.58
deserialize SyncCommitteeMessage - struct 1.2440 us/op 2.1860 us/op 0.57
deserialize SignedContributionAndProof - tree 1.9510 us/op 3.8440 us/op 0.51
deserialize SignedContributionAndProof - struct 2.4810 us/op 5.4430 us/op 0.46
deserialize SignedBeaconBlock - tree 212.50 us/op 499.58 us/op 0.43
deserialize SignedBeaconBlock - struct 126.35 us/op 279.05 us/op 0.45
BeaconState vc 300000 - deserialize tree 668.02 ms/op 1.2072 s/op 0.55
BeaconState vc 300000 - serialize tree 138.84 ms/op 367.30 ms/op 0.38
BeaconState.historicalRoots vc 300000 - deserialize tree 822.00 ns/op 1.1880 us/op 0.69
BeaconState.historicalRoots vc 300000 - serialize tree 808.00 ns/op 1.5940 us/op 0.51
BeaconState.validators vc 300000 - deserialize tree 658.74 ms/op 1.2360 s/op 0.53
BeaconState.validators vc 300000 - serialize tree 136.49 ms/op 290.77 ms/op 0.47
BeaconState.balances vc 300000 - deserialize tree 23.844 ms/op 49.244 ms/op 0.48
BeaconState.balances vc 300000 - serialize tree 3.6407 ms/op 5.5780 ms/op 0.65
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 470.63 us/op 958.16 us/op 0.49
BeaconState.previousEpochParticipation vc 300000 - serialize tree 283.80 us/op 458.68 us/op 0.62
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 435.57 us/op 950.84 us/op 0.46
BeaconState.currentEpochParticipation vc 300000 - serialize tree 280.14 us/op 487.42 us/op 0.57
BeaconState.inactivityScores vc 300000 - deserialize tree 25.739 ms/op 49.014 ms/op 0.53
BeaconState.inactivityScores vc 300000 - serialize tree 3.5430 ms/op 5.7566 ms/op 0.62
hashTreeRoot Attestation - struct 31.934 us/op 58.186 us/op 0.55
hashTreeRoot Attestation - tree 21.158 us/op 29.190 us/op 0.72
hashTreeRoot SignedAggregateAndProof - struct 43.991 us/op 76.700 us/op 0.57
hashTreeRoot SignedAggregateAndProof - tree 28.526 us/op 51.781 us/op 0.55
hashTreeRoot SyncCommitteeMessage - struct 10.189 us/op 17.794 us/op 0.57
hashTreeRoot SyncCommitteeMessage - tree 6.2420 us/op 12.005 us/op 0.52
hashTreeRoot SignedContributionAndProof - struct 28.691 us/op 50.868 us/op 0.56
hashTreeRoot SignedContributionAndProof - tree 20.408 us/op 29.269 us/op 0.70
hashTreeRoot SignedBeaconBlock - struct 2.4246 ms/op 4.4560 ms/op 0.54
hashTreeRoot SignedBeaconBlock - tree 1.6663 ms/op 2.6544 ms/op 0.63
hashTreeRoot Validator - struct 13.688 us/op 22.812 us/op 0.60
hashTreeRoot Validator - tree 11.172 us/op 19.539 us/op 0.57
BeaconState vc 300000 - hashTreeRoot tree 3.7451 s/op 5.9103 s/op 0.63
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 1.5200 us/op 2.3680 us/op 0.64
BeaconState.validators vc 300000 - hashTreeRoot tree 3.5874 s/op 5.6794 s/op 0.63
BeaconState.balances vc 300000 - hashTreeRoot tree 87.773 ms/op 140.91 ms/op 0.62
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 9.0118 ms/op 14.273 ms/op 0.63
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 9.0055 ms/op 14.367 ms/op 0.63
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 82.622 ms/op 142.50 ms/op 0.58
hash64 x18 19.718 us/op 31.820 us/op 0.62
hashTwoObjects x18 18.105 us/op 27.632 us/op 0.66
hash64 x1740 1.8522 ms/op 2.9347 ms/op 0.63
hashTwoObjects x1740 1.7245 ms/op 2.7014 ms/op 0.64
hash64 x2700000 2.8904 s/op 4.5627 s/op 0.63
hashTwoObjects x2700000 2.6709 s/op 4.1799 s/op 0.64
get_exitEpoch - ContainerType 225.00 ns/op 567.00 ns/op 0.40
get_exitEpoch - ContainerNodeStructType 220.00 ns/op 465.00 ns/op 0.47
set_exitEpoch - ContainerType 270.00 ns/op 503.00 ns/op 0.54
set_exitEpoch - ContainerNodeStructType 220.00 ns/op 353.00 ns/op 0.62
get_pubkey - ContainerType 1.1420 us/op 1.8300 us/op 0.62
get_pubkey - ContainerNodeStructType 228.00 ns/op 359.00 ns/op 0.64
hashTreeRoot - ContainerType 391.00 ns/op 568.00 ns/op 0.69
hashTreeRoot - ContainerNodeStructType 473.00 ns/op 713.00 ns/op 0.66
createProof - ContainerType 4.4800 us/op 8.2170 us/op 0.55
createProof - ContainerNodeStructType 24.935 us/op 44.039 us/op 0.57
serialize - ContainerType 2.1860 us/op 3.3340 us/op 0.66
serialize - ContainerNodeStructType 1.7230 us/op 2.7550 us/op 0.63
set_exitEpoch_and_hashTreeRoot - ContainerType 4.2430 us/op 6.8830 us/op 0.62
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 12.015 us/op 19.340 us/op 0.62
Array - for of 5.4260 us/op 30.661 us/op 0.18
Array - for(;;) 4.8430 us/op 26.349 us/op 0.18
basicListValue.readonlyValuesArray() 4.4211 ms/op 5.9383 ms/op 0.74
basicListValue.readonlyValuesArray() + loop all 4.2492 ms/op 6.1437 ms/op 0.69
compositeListValue.readonlyValuesArray() 29.535 ms/op 48.726 ms/op 0.61
compositeListValue.readonlyValuesArray() + loop all 26.604 ms/op 46.805 ms/op 0.57
Number64UintType - get balances list 4.1348 ms/op 7.2311 ms/op 0.57
Number64UintType - set balances list 8.8361 ms/op 17.542 ms/op 0.50
Number64UintType - get and increase 10 then set 39.263 ms/op 77.909 ms/op 0.50
Number64UintType - increase 10 using applyDelta 15.650 ms/op 30.333 ms/op 0.52
Number64UintType - increase 10 using applyDeltaInBatch 15.835 ms/op 31.195 ms/op 0.51
tree_newTreeFromUint64Deltas 18.454 ms/op 34.696 ms/op 0.53
unsafeUint8ArrayToTree 32.120 ms/op 56.249 ms/op 0.57
bitLength(50) 228.00 ns/op 362.00 ns/op 0.63
bitLengthStr(50) 234.00 ns/op 431.00 ns/op 0.54
bitLength(8000) 219.00 ns/op 357.00 ns/op 0.61
bitLengthStr(8000) 286.00 ns/op 582.00 ns/op 0.49
bitLength(250000) 214.00 ns/op 368.00 ns/op 0.58
bitLengthStr(250000) 318.00 ns/op 685.00 ns/op 0.46
floor - Math.floor (53) 0.46433 ns/op 0.68434 ns/op 0.68
floor - << 0 (53) 0.46517 ns/op 0.69194 ns/op 0.67
floor - Math.floor (512) 0.46466 ns/op 0.68089 ns/op 0.68
floor - << 0 (512) 0.46501 ns/op 0.68873 ns/op 0.68
fnIf(0) 1.5468 ns/op 2.1342 ns/op 0.72
fnSwitch(0) 2.4767 ns/op 3.3480 ns/op 0.74
fnObj(0) 0.46545 ns/op 0.67376 ns/op 0.69
fnArr(0) 0.46394 ns/op 0.68918 ns/op 0.67
fnIf(4) 2.1813 ns/op 3.1444 ns/op 0.69
fnSwitch(4) 2.4861 ns/op 3.2590 ns/op 0.76
fnObj(4) 0.46487 ns/op 0.67471 ns/op 0.69
fnArr(4) 0.46483 ns/op 0.69428 ns/op 0.67
fnIf(9) 3.0926 ns/op 4.3439 ns/op 0.71
fnSwitch(9) 2.4752 ns/op 3.3944 ns/op 0.73
fnObj(9) 0.46528 ns/op 0.68443 ns/op 0.68
fnArr(9) 0.46449 ns/op 0.68015 ns/op 0.68
Container {a,b,vec} - as struct x100000 46.743 us/op 69.487 us/op 0.67
Container {a,b,vec} - as tree x100000 371.51 us/op 672.84 us/op 0.55
Container {a,vec,b} - as struct x100000 78.693 us/op 105.38 us/op 0.75
Container {a,vec,b} - as tree x100000 402.56 us/op 765.48 us/op 0.53
get 2 props x1000000 - rawObject 309.61 us/op 388.45 us/op 0.80
get 2 props x1000000 - proxy 71.302 ms/op 116.89 ms/op 0.61
get 2 props x1000000 - customObj 310.18 us/op 390.21 us/op 0.79
Simple object binary -> struct 840.00 ns/op 1.3020 us/op 0.65
Simple object binary -> tree_backed 2.3570 us/op 3.2640 us/op 0.72
Simple object struct -> tree_backed 3.0300 us/op 4.6390 us/op 0.65
Simple object tree_backed -> struct 2.5310 us/op 3.7180 us/op 0.68
Simple object struct -> binary 1.2110 us/op 1.8450 us/op 0.66
Simple object tree_backed -> binary 1.9020 us/op 3.3830 us/op 0.56
aggregationBits binary -> struct 666.00 ns/op 1.1270 us/op 0.59
aggregationBits binary -> tree_backed 2.5710 us/op 4.2030 us/op 0.61
aggregationBits struct -> tree_backed 3.0300 us/op 4.9730 us/op 0.61
aggregationBits tree_backed -> struct 1.2860 us/op 1.9800 us/op 0.65
aggregationBits struct -> binary 883.00 ns/op 1.3990 us/op 0.63
aggregationBits tree_backed -> binary 1.1280 us/op 1.7520 us/op 0.64
List(uint8) 100000 binary -> struct 1.3122 ms/op 1.9465 ms/op 0.67
List(uint8) 100000 binary -> tree_backed 89.363 us/op 226.38 us/op 0.39
List(uint8) 100000 struct -> tree_backed 1.3268 ms/op 2.2191 ms/op 0.60
List(uint8) 100000 tree_backed -> struct 985.89 us/op 1.5113 ms/op 0.65
List(uint8) 100000 struct -> binary 1.2739 ms/op 2.0898 ms/op 0.61
List(uint8) 100000 tree_backed -> binary 82.739 us/op 161.39 us/op 0.51
List(uint64Number) 100000 binary -> struct 1.2678 ms/op 2.2212 ms/op 0.57
List(uint64Number) 100000 binary -> tree_backed 3.5315 ms/op 7.1330 ms/op 0.50
List(uint64Number) 100000 struct -> tree_backed 5.2749 ms/op 11.459 ms/op 0.46
List(uint64Number) 100000 tree_backed -> struct 2.0633 ms/op 3.4802 ms/op 0.59
List(uint64Number) 100000 struct -> binary 1.4296 ms/op 2.5311 ms/op 0.56
List(uint64Number) 100000 tree_backed -> binary 783.04 us/op 1.4266 ms/op 0.55
List(Uint64Bigint) 100000 binary -> struct 3.4344 ms/op 6.1954 ms/op 0.55
List(Uint64Bigint) 100000 binary -> tree_backed 3.9028 ms/op 6.9303 ms/op 0.56
List(Uint64Bigint) 100000 struct -> tree_backed 5.2220 ms/op 10.879 ms/op 0.48
List(Uint64Bigint) 100000 tree_backed -> struct 4.1935 ms/op 7.8438 ms/op 0.53
List(Uint64Bigint) 100000 struct -> binary 2.0563 ms/op 3.3000 ms/op 0.62
List(Uint64Bigint) 100000 tree_backed -> binary 824.74 us/op 1.2166 ms/op 0.68
Vector(Root) 100000 binary -> struct 36.035 ms/op 69.217 ms/op 0.52
Vector(Root) 100000 binary -> tree_backed 38.171 ms/op 72.949 ms/op 0.52
Vector(Root) 100000 struct -> tree_backed 41.268 ms/op 84.458 ms/op 0.49
Vector(Root) 100000 tree_backed -> struct 48.524 ms/op 94.108 ms/op 0.52
Vector(Root) 100000 struct -> binary 1.8608 ms/op 3.7477 ms/op 0.50
Vector(Root) 100000 tree_backed -> binary 8.3733 ms/op 15.241 ms/op 0.55
List(Validator) 100000 binary -> struct 131.07 ms/op 228.16 ms/op 0.57
List(Validator) 100000 binary -> tree_backed 345.35 ms/op 667.08 ms/op 0.52
List(Validator) 100000 struct -> tree_backed 357.01 ms/op 701.45 ms/op 0.51
List(Validator) 100000 tree_backed -> struct 211.36 ms/op 394.13 ms/op 0.54
List(Validator) 100000 struct -> binary 29.762 ms/op 55.315 ms/op 0.54
List(Validator) 100000 tree_backed -> binary 95.595 ms/op 173.48 ms/op 0.55
List(Validator-NS) 100000 binary -> struct 121.80 ms/op 254.60 ms/op 0.48
List(Validator-NS) 100000 binary -> tree_backed 176.04 ms/op 346.48 ms/op 0.51
List(Validator-NS) 100000 struct -> tree_backed 214.29 ms/op 412.97 ms/op 0.52
List(Validator-NS) 100000 tree_backed -> struct 172.07 ms/op 352.93 ms/op 0.49
List(Validator-NS) 100000 struct -> binary 29.645 ms/op 58.219 ms/op 0.51
List(Validator-NS) 100000 tree_backed -> binary 34.265 ms/op 67.324 ms/op 0.51
get epochStatuses - MutableVector 90.623 us/op 194.00 us/op 0.47
get epochStatuses - ViewDU 197.34 us/op 283.80 us/op 0.70
set epochStatuses - ListTreeView 1.4154 ms/op 2.4204 ms/op 0.58
set epochStatuses - ListTreeView - set() 430.18 us/op 696.01 us/op 0.62
set epochStatuses - ListTreeView - commit() 423.71 us/op 696.92 us/op 0.61
bitstring 643.92 ns/op 870.54 ns/op 0.74
bit mask 14.002 ns/op 16.171 ns/op 0.87
struct - increase slot to 1000000 927.51 us/op 3.1197 ms/op 0.30
UintNumberType - increase slot to 1000000 28.167 ms/op 50.108 ms/op 0.56
UintBigintType - increase slot to 1000000 419.71 ms/op 742.95 ms/op 0.56
UintBigint8 x 100000 tree_deserialize 4.6579 ms/op 7.2105 ms/op 0.65
UintBigint8 x 100000 tree_serialize 1.1852 ms/op 2.1184 ms/op 0.56
UintBigint16 x 100000 tree_deserialize 3.5245 ms/op 7.2165 ms/op 0.49
UintBigint16 x 100000 tree_serialize 1.1945 ms/op 2.1317 ms/op 0.56
UintBigint32 x 100000 tree_deserialize 4.8686 ms/op 9.3805 ms/op 0.52
UintBigint32 x 100000 tree_serialize 1.2423 ms/op 2.2403 ms/op 0.55
UintBigint64 x 100000 tree_deserialize 5.3861 ms/op 9.7289 ms/op 0.55
UintBigint64 x 100000 tree_serialize 1.6721 ms/op 2.7724 ms/op 0.60
UintBigint8 x 100000 value_deserialize 433.22 us/op 694.80 us/op 0.62
UintBigint8 x 100000 value_serialize 614.04 us/op 1.5971 ms/op 0.38
UintBigint16 x 100000 value_deserialize 464.42 us/op 696.49 us/op 0.67
UintBigint16 x 100000 value_serialize 659.09 us/op 1.6112 ms/op 0.41
UintBigint32 x 100000 value_deserialize 433.37 us/op 700.35 us/op 0.62
UintBigint32 x 100000 value_serialize 651.62 us/op 1.6432 ms/op 0.40
UintBigint64 x 100000 value_deserialize 465.29 us/op 765.00 us/op 0.61
UintBigint64 x 100000 value_serialize 836.57 us/op 1.7961 ms/op 0.47
UintBigint8 x 100000 deserialize 4.7939 ms/op 7.9877 ms/op 0.60
UintBigint8 x 100000 serialize 1.4524 ms/op 2.4504 ms/op 0.59
UintBigint16 x 100000 deserialize 4.6705 ms/op 8.3749 ms/op 0.56
UintBigint16 x 100000 serialize 1.4774 ms/op 2.7444 ms/op 0.54
UintBigint32 x 100000 deserialize 5.4014 ms/op 9.5079 ms/op 0.57
UintBigint32 x 100000 serialize 2.8449 ms/op 4.5931 ms/op 0.62
UintBigint64 x 100000 deserialize 3.8433 ms/op 6.2289 ms/op 0.62
UintBigint64 x 100000 serialize 1.5083 ms/op 2.4042 ms/op 0.63
UintBigint128 x 100000 deserialize 6.0175 ms/op 10.244 ms/op 0.59
UintBigint128 x 100000 serialize 17.253 ms/op 34.102 ms/op 0.51
UintBigint256 x 100000 deserialize 11.024 ms/op 18.303 ms/op 0.60
UintBigint256 x 100000 serialize 52.288 ms/op 105.82 ms/op 0.49
Slice from Uint8Array x25000 1.0165 ms/op 1.9050 ms/op 0.53
Slice from ArrayBuffer x25000 17.301 ms/op 33.094 ms/op 0.52
Slice from ArrayBuffer x25000 + new Uint8Array 18.541 ms/op 36.703 ms/op 0.51
Copy Uint8Array 100000 iterate 806.58 us/op 1.1367 ms/op 0.71
Copy Uint8Array 100000 slice 92.351 us/op 144.02 us/op 0.64
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 92.282 us/op 322.71 us/op 0.29
Copy Buffer 100000 Uint8Array.prototype.slice.call 90.960 us/op 420.80 us/op 0.22
Copy Uint8Array 100000 slice + set 163.30 us/op 762.08 us/op 0.21
Copy Uint8Array 100000 subarray + set 91.470 us/op 415.04 us/op 0.22
Copy Uint8Array 100000 slice arrayBuffer 94.012 us/op 437.70 us/op 0.21
Uint64 deserialize 100000 - iterate Uint8Array 1.7687 ms/op 2.7068 ms/op 0.65
Uint64 deserialize 100000 - by Uint32A 1.7312 ms/op 2.4316 ms/op 0.71
Uint64 deserialize 100000 - by DataView.getUint32 x2 1.8614 ms/op 2.4497 ms/op 0.76
Uint64 deserialize 100000 - by DataView.getBigUint64 4.8660 ms/op 8.0940 ms/op 0.60
Uint64 deserialize 100000 - by byte 43.074 ms/op 68.528 ms/op 0.63

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 9ba2456 into master Feb 10, 2024
8 checks passed
@wemeetagain wemeetagain deleted the cayman/relax-intersect-values branch February 10, 2024 04:06
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