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

chore: migrate from mocha to vitest (#422) #428

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nazarhussain
Copy link
Contributor

Motivation

Use consistent dependencies and frameworks across the repos.

Description

  • One step towards supporting different JS runtimes
  • Move all unit tests to vitest
  • Move all browsers tests to vitest

Steps to test or reproduce

  • Run all tests

* Add vitest package

* Add vitest config files

* Update test files to use vitest

* Remove unused packages

* Update CI task

* Update typescript to latest minor version

* Update ts config

* Update ts-node

* Fix lint errors

* Fix build step

* Fix spec test runner

* Update the CI tasks

* Fix timeout

* Fix a chai version

* Remove unused task
Copy link

github-actions bot commented Dec 20, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 327be3f Previous: 67bcd88 Ratio
digestTwoHashObjects 50023 times 48.496 ms/op 48.534 ms/op 1.00
digest64 50023 times 53.461 ms/op 54.307 ms/op 0.98
digest 50023 times 54.798 ms/op 59.754 ms/op 0.92
input length 32 1.2010 us/op 1.2640 us/op 0.95
input length 64 1.3660 us/op 1.4560 us/op 0.94
input length 128 2.3030 us/op 2.4600 us/op 0.94
input length 256 3.4520 us/op 3.6240 us/op 0.95
input length 512 5.7460 us/op 5.9160 us/op 0.97
input length 1024 11.245 us/op 11.497 us/op 0.98
digest 1000000 times 953.02 ms/op 963.19 ms/op 0.99
hashObjectToByteArray 50023 times 1.2440 ms/op 1.2444 ms/op 1.00
byteArrayToHashObject 50023 times 1.7889 ms/op 1.8378 ms/op 0.97
digest64 200092 times 221.39 ms/op 228.31 ms/op 0.97
hash 200092 times using batchHash4UintArray64s 250.15 ms/op 261.17 ms/op 0.96
digest64HashObjects 200092 times 197.50 ms/op 216.93 ms/op 0.91
hash 200092 times using batchHash4HashObjectInputs 211.07 ms/op 225.43 ms/op 0.94
getGindicesAtDepth 4.1580 us/op 4.5980 us/op 0.90
iterateAtDepth 7.4970 us/op 7.7860 us/op 0.96
getGindexBits 444.00 ns/op 489.00 ns/op 0.91
gindexIterator 1.0190 us/op 1.0870 us/op 0.94
HashComputationLevel.push then loop 28.936 ms/op 35.178 ms/op 0.82
HashComputation[] push then loop 47.924 ms/op 51.206 ms/op 0.94
hash 2 Uint8Array 500000 times - as-sha256 553.03 ms/op 547.45 ms/op 1.01
hashTwoObjects 500000 times - as-sha256 507.58 ms/op 503.27 ms/op 1.01
executeHashComputations - as-sha256 45.103 ms/op 50.429 ms/op 0.89
hash 2 Uint8Array 500000 times - noble 1.2345 s/op 1.3393 s/op 0.92
hashTwoObjects 500000 times - noble 1.6953 s/op 1.9093 s/op 0.89
executeHashComputations - noble 36.270 ms/op 44.044 ms/op 0.82
hash 2 Uint8Array 500000 times - hashtree 227.12 ms/op 230.05 ms/op 0.99
hashTwoObjects 500000 times - hashtree 222.31 ms/op 223.71 ms/op 0.99
executeHashComputations - hashtree 10.057 ms/op 11.933 ms/op 0.84
getHashComputations 3.3114 ms/op 3.1171 ms/op 1.06
executeHashComputations 10.042 ms/op 13.363 ms/op 0.75
get root 16.595 ms/op 15.899 ms/op 1.04
getNodeH() x7812.5 avg hindex 12.249 us/op 12.304 us/op 1.00
getNodeH() x7812.5 index 0 7.4570 us/op 7.4900 us/op 1.00
getNodeH() x7812.5 index 7 7.5820 us/op 7.5500 us/op 1.00
getNodeH() x7812.5 index 7 with key array 6.3300 us/op 6.2710 us/op 1.01
new LeafNode() x7812.5 298.97 us/op 348.47 us/op 0.86
getHashComputations 250000 nodes 14.948 ms/op 18.653 ms/op 0.80
batchHash 250000 nodes 86.720 ms/op 95.616 ms/op 0.91
get root 250000 nodes 119.77 ms/op 119.05 ms/op 1.01
getHashComputations 500000 nodes 33.443 ms/op 30.525 ms/op 1.10
batchHash 500000 nodes 170.18 ms/op 181.21 ms/op 0.94
get root 500000 nodes 239.32 ms/op 239.66 ms/op 1.00
getHashComputations 1000000 nodes 61.265 ms/op 70.064 ms/op 0.87
batchHash 1000000 nodes 366.59 ms/op 405.13 ms/op 0.90
get root 1000000 nodes 487.69 ms/op 489.02 ms/op 1.00
multiproof - depth 15, 1 requested leaves 10.123 us/op 9.5110 us/op 1.06
tree offset multiproof - depth 15, 1 requested leaves 22.090 us/op 20.496 us/op 1.08
compact multiproof - depth 15, 1 requested leaves 4.0090 us/op 4.0970 us/op 0.98
multiproof - depth 15, 2 requested leaves 14.025 us/op 13.534 us/op 1.04
tree offset multiproof - depth 15, 2 requested leaves 25.904 us/op 24.609 us/op 1.05
compact multiproof - depth 15, 2 requested leaves 4.0420 us/op 3.9200 us/op 1.03
multiproof - depth 15, 3 requested leaves 19.517 us/op 18.742 us/op 1.04
tree offset multiproof - depth 15, 3 requested leaves 33.065 us/op 31.574 us/op 1.05
compact multiproof - depth 15, 3 requested leaves 6.0730 us/op 5.2900 us/op 1.15
multiproof - depth 15, 4 requested leaves 26.256 us/op 24.069 us/op 1.09
tree offset multiproof - depth 15, 4 requested leaves 41.596 us/op 38.556 us/op 1.08
compact multiproof - depth 15, 4 requested leaves 7.6320 us/op 6.3280 us/op 1.21
packedRootsBytesToLeafNodes bytes 4000 offset 0 8.0710 us/op 7.2120 us/op 1.12
packedRootsBytesToLeafNodes bytes 4000 offset 1 7.8120 us/op 7.1830 us/op 1.09
packedRootsBytesToLeafNodes bytes 4000 offset 2 7.1780 us/op 7.1300 us/op 1.01
packedRootsBytesToLeafNodes bytes 4000 offset 3 6.3770 us/op 7.2200 us/op 0.88
subtreeFillToContents depth 40 count 250000 46.318 ms/op 52.492 ms/op 0.88
setRoot - gindexBitstring 21.966 ms/op 30.338 ms/op 0.72
setRoot - gindex 22.943 ms/op 32.009 ms/op 0.72
getRoot - gindexBitstring 2.6750 ms/op 3.1038 ms/op 0.86
getRoot - gindex 3.2385 ms/op 3.7137 ms/op 0.87
getHashObject then setHashObject 22.148 ms/op 32.499 ms/op 0.68
setNodeWithFn 19.838 ms/op 30.711 ms/op 0.65
getNodeAtDepth depth 0 x100000 280.13 us/op 280.74 us/op 1.00
setNodeAtDepth depth 0 x100000 2.5983 ms/op 4.6873 ms/op 0.55
getNodesAtDepth depth 0 x100000 313.58 us/op 312.18 us/op 1.00
setNodesAtDepth depth 0 x100000 881.32 us/op 762.22 us/op 1.16
getNodeAtDepth depth 1 x100000 345.27 us/op 342.23 us/op 1.01
setNodeAtDepth depth 1 x100000 8.6567 ms/op 13.373 ms/op 0.65
getNodesAtDepth depth 1 x100000 440.00 us/op 436.20 us/op 1.01
setNodesAtDepth depth 1 x100000 7.2327 ms/op 11.255 ms/op 0.64
getNodeAtDepth depth 2 x100000 874.64 us/op 759.77 us/op 1.15
setNodeAtDepth depth 2 x100000 16.015 ms/op 24.167 ms/op 0.66
getNodesAtDepth depth 2 x100000 19.301 ms/op 21.294 ms/op 0.91
setNodesAtDepth depth 2 x100000 25.442 ms/op 31.703 ms/op 0.80
tree.getNodesAtDepth - gindexes 10.206 ms/op 12.719 ms/op 0.80
tree.getNodesAtDepth - push all nodes 2.4762 ms/op 5.1470 ms/op 0.48
tree.getNodesAtDepth - navigation 311.14 us/op 311.54 us/op 1.00
tree.setNodesAtDepth - indexes 790.10 us/op 1.1858 ms/op 0.67
set at depth 8 865.00 ns/op 1.1310 us/op 0.76
set at depth 16 1.2790 us/op 1.7230 us/op 0.74
set at depth 32 2.1800 us/op 2.9230 us/op 0.75
iterateNodesAtDepth 8 256 15.714 us/op 17.667 us/op 0.89
getNodesAtDepth 8 256 3.8070 us/op 4.4100 us/op 0.86
iterateNodesAtDepth 16 65536 4.7909 ms/op 5.3122 ms/op 0.90
getNodesAtDepth 16 65536 2.1255 ms/op 4.0677 ms/op 0.52
iterateNodesAtDepth 32 250000 17.262 ms/op 19.013 ms/op 0.91
getNodesAtDepth 32 250000 5.2145 ms/op 8.4214 ms/op 0.62
iterateNodesAtDepth 40 250000 17.963 ms/op 19.117 ms/op 0.94
getNodesAtDepth 40 250000 4.6595 ms/op 8.6194 ms/op 0.54
250000 validators root getter 121.44 ms/op 121.23 ms/op 1.00
250000 validators batchHash() 94.142 ms/op 142.47 ms/op 0.66
250000 validators hashComputations 19.262 ms/op 22.696 ms/op 0.85
bitlist bytes to struct (120,90) 869.00 ns/op 920.00 ns/op 0.94
bitlist bytes to tree (120,90) 3.3540 us/op 3.4900 us/op 0.96
bitlist bytes to struct (2048,2048) 1.1280 us/op 1.5770 us/op 0.72
bitlist bytes to tree (2048,2048) 4.2760 us/op 6.2810 us/op 0.68
ByteListType - deserialize 7.9793 ms/op 12.107 ms/op 0.66
BasicListType - deserialize 16.062 ms/op 16.994 ms/op 0.95
ByteListType - serialize 11.569 ms/op 12.032 ms/op 0.96
BasicListType - serialize 11.667 ms/op 16.130 ms/op 0.72
BasicListType - tree_convertToStruct 28.038 ms/op 36.064 ms/op 0.78
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 4.8181 ms/op 7.2252 ms/op 0.67
List[uint8, 68719476736] len 300000 ViewDU.get(i) 4.2351 ms/op 4.2639 ms/op 0.99
Array.push len 300000 empty Array - number 6.9977 ms/op 7.5834 ms/op 0.92
Array.set len 300000 from new Array - number 1.9936 ms/op 2.9362 ms/op 0.68
Array.set len 300000 - number 6.5337 ms/op 7.7359 ms/op 0.84
Uint8Array.set len 300000 491.94 us/op 497.16 us/op 0.99
Uint32Array.set len 300000 561.22 us/op 591.39 us/op 0.95
Container({a: uint8, b: uint8}) getViewDU x300000 25.401 ms/op 30.896 ms/op 0.82
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 11.183 ms/op 12.371 ms/op 0.90
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 221.37 ms/op 252.50 ms/op 0.88
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 271.35 ms/op 319.45 ms/op 0.85
List(Container) len 300000 ViewDU.get(i) 6.8650 ms/op 9.4577 ms/op 0.73
List(Container) len 300000 ViewDU.getReadonly(i) 6.6267 ms/op 8.9362 ms/op 0.74
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 42.506 ms/op 41.379 ms/op 1.03
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 5.6936 ms/op 7.7182 ms/op 0.74
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 6.5461 ms/op 7.9956 ms/op 0.82
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 6.0739 ms/op 7.8038 ms/op 0.78
Array.push len 300000 empty Array - object 6.5146 ms/op 7.9760 ms/op 0.82
Array.set len 300000 from new Array - object 2.0967 ms/op 2.7097 ms/op 0.77
Array.set len 300000 - object 6.5562 ms/op 7.7203 ms/op 0.85
cachePermanentRootStruct no cache 19.379 us/op 23.078 us/op 0.84
cachePermanentRootStruct with cache 224.00 ns/op 307.00 ns/op 0.73
epochParticipation len 250000 rws 7813 2.4281 ms/op 2.6454 ms/op 0.92
BeaconState ViewDU hashTreeRoot() vc=200000 543.31 ms/op 622.47 ms/op 0.87
BeaconState ViewDU recursive hash - commit step vc=200000 5.8739 ms/op 5.1588 ms/op 1.14
BeaconState ViewDU validator tree creation vc=10000 39.784 ms/op 44.505 ms/op 0.89
BeaconState ViewDU batchHashTreeRoot vc=200000 397.30 ms/op 450.06 ms/op 0.88
BeaconState ViewDU hashTreeRoot - commit step vc=200000 338.97 ms/op 412.77 ms/op 0.82
BeaconState ViewDU hashTreeRoot - hash step vc=200000 70.941 ms/op 75.035 ms/op 0.95
deserialize Attestation - tree 3.6280 us/op 4.4230 us/op 0.82
deserialize Attestation - struct 1.8980 us/op 2.4120 us/op 0.79
deserialize SignedAggregateAndProof - tree 5.0180 us/op 6.1330 us/op 0.82
deserialize SignedAggregateAndProof - struct 2.9950 us/op 3.9570 us/op 0.76
deserialize SyncCommitteeMessage - tree 1.4220 us/op 1.6970 us/op 0.84
deserialize SyncCommitteeMessage - struct 1.0440 us/op 1.3570 us/op 0.77
deserialize SignedContributionAndProof - tree 3.0260 us/op 3.5800 us/op 0.85
deserialize SignedContributionAndProof - struct 2.4310 us/op 3.0830 us/op 0.79
deserialize SignedBeaconBlock - tree 301.14 us/op 366.50 us/op 0.82
deserialize SignedBeaconBlock - struct 133.53 us/op 167.06 us/op 0.80
BeaconState vc 300000 - deserialize tree 656.59 ms/op 753.75 ms/op 0.87
BeaconState vc 300000 - serialize tree 128.72 ms/op 185.45 ms/op 0.69
BeaconState.historicalRoots vc 300000 - deserialize tree 878.00 ns/op 1.0190 us/op 0.86
BeaconState.historicalRoots vc 300000 - serialize tree 682.00 ns/op 855.00 ns/op 0.80
BeaconState.validators vc 300000 - deserialize tree 608.78 ms/op 727.49 ms/op 0.84
BeaconState.validators vc 300000 - serialize tree 122.65 ms/op 136.73 ms/op 0.90
BeaconState.balances vc 300000 - deserialize tree 29.268 ms/op 30.668 ms/op 0.95
BeaconState.balances vc 300000 - serialize tree 3.7526 ms/op 6.4318 ms/op 0.58
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 887.28 us/op 1.4022 ms/op 0.63
BeaconState.previousEpochParticipation vc 300000 - serialize tree 327.74 us/op 349.95 us/op 0.94
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 904.37 us/op 1.3746 ms/op 0.66
BeaconState.currentEpochParticipation vc 300000 - serialize tree 324.76 us/op 356.14 us/op 0.91
BeaconState.inactivityScores vc 300000 - deserialize tree 27.418 ms/op 31.678 ms/op 0.87
BeaconState.inactivityScores vc 300000 - serialize tree 4.2736 ms/op 7.9826 ms/op 0.54
hashTreeRoot Attestation - struct 80.007 us/op 129.30 us/op 0.62
hashTreeRoot Attestation - tree 73.648 us/op 137.54 us/op 0.54
hashTreeRoot SignedAggregateAndProof - struct 102.33 us/op 178.99 us/op 0.57
hashTreeRoot SignedAggregateAndProof - tree 107.42 us/op 162.40 us/op 0.66
hashTreeRoot SyncCommitteeMessage - struct 22.922 us/op 32.456 us/op 0.71
hashTreeRoot SyncCommitteeMessage - tree 24.512 us/op 36.496 us/op 0.67
hashTreeRoot SignedContributionAndProof - struct 62.081 us/op 102.88 us/op 0.60
hashTreeRoot SignedContributionAndProof - tree 68.608 us/op 105.59 us/op 0.65
hashTreeRoot SignedBeaconBlock - struct 5.8424 ms/op 7.7297 ms/op 0.76
hashTreeRoot SignedBeaconBlock - tree 6.4684 ms/op 7.1112 ms/op 0.91
hashTreeRoot Validator - struct 27.370 us/op 33.093 us/op 0.83
hashTreeRoot Validator - tree 31.745 us/op 38.402 us/op 0.83
BeaconState vc 300000 - hashTreeRoot tree 11.368 s/op 13.470 s/op 0.84
BeaconState vc 300000 - batchHashTreeRoot tree 6.6730 s/op 7.0883 s/op 0.94
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 4.1390 us/op 12.266 us/op 0.34
BeaconState.validators vc 300000 - hashTreeRoot tree 11.119 s/op 13.300 s/op 0.84
BeaconState.balances vc 300000 - hashTreeRoot tree 304.16 ms/op 347.50 ms/op 0.88
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 39.381 ms/op 47.842 ms/op 0.82
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 38.529 ms/op 43.464 ms/op 0.89
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 340.84 ms/op 345.34 ms/op 0.99
hash64 x18 53.582 us/op 57.063 us/op 0.94
hashTwoObjects x18 73.860 us/op 78.961 us/op 0.94
hash64 x1740 4.8664 ms/op 5.4195 ms/op 0.90
hashTwoObjects x1740 6.4949 ms/op 7.6401 ms/op 0.85
hash64 x2700000 7.1275 s/op 8.2063 s/op 0.87
hashTwoObjects x2700000 9.6309 s/op 11.876 s/op 0.81
get_exitEpoch - ContainerType 305.00 ns/op 349.00 ns/op 0.87
get_exitEpoch - ContainerNodeStructType 282.00 ns/op 308.00 ns/op 0.92
set_exitEpoch - ContainerType 288.00 ns/op 333.00 ns/op 0.86
set_exitEpoch - ContainerNodeStructType 274.00 ns/op 300.00 ns/op 0.91
get_pubkey - ContainerType 1.0240 us/op 1.0480 us/op 0.98
get_pubkey - ContainerNodeStructType 261.00 ns/op 265.00 ns/op 0.98
hashTreeRoot - ContainerType 459.00 ns/op 526.00 ns/op 0.87
hashTreeRoot - ContainerNodeStructType 453.00 ns/op 493.00 ns/op 0.92
createProof - ContainerType 4.8910 us/op 4.6860 us/op 1.04
createProof - ContainerNodeStructType 22.285 us/op 24.618 us/op 0.91
serialize - ContainerType 1.6370 us/op 2.0110 us/op 0.81
serialize - ContainerNodeStructType 1.3500 us/op 1.6850 us/op 0.80
set_exitEpoch_and_hashTreeRoot - ContainerType 11.815 us/op 14.952 us/op 0.79
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 30.722 us/op 37.650 us/op 0.82
Array - for of 5.6640 us/op 5.7940 us/op 0.98
Array - for(;;) 5.5690 us/op 5.7660 us/op 0.97
basicListValue.readonlyValuesArray() 4.0085 ms/op 5.8944 ms/op 0.68
basicListValue.readonlyValuesArray() + loop all 4.1662 ms/op 6.4809 ms/op 0.64
compositeListValue.readonlyValuesArray() 36.075 ms/op 29.846 ms/op 1.21
compositeListValue.readonlyValuesArray() + loop all 35.198 ms/op 32.682 ms/op 1.08
Number64UintType - get balances list 4.1518 ms/op 4.9500 ms/op 0.84
Number64UintType - set balances list 9.9051 ms/op 10.209 ms/op 0.97
Number64UintType - get and increase 10 then set 33.925 ms/op 46.200 ms/op 0.73
Number64UintType - increase 10 using applyDelta 13.916 ms/op 17.176 ms/op 0.81
Number64UintType - increase 10 using applyDeltaInBatch 14.007 ms/op 16.435 ms/op 0.85
tree_newTreeFromUint64Deltas 24.478 ms/op 22.433 ms/op 1.09
unsafeUint8ArrayToTree 36.872 ms/op 41.909 ms/op 0.88
bitLength(50) 240.00 ns/op 279.00 ns/op 0.86
bitLengthStr(50) 200.00 ns/op 245.00 ns/op 0.82
bitLength(8000) 209.00 ns/op 265.00 ns/op 0.79
bitLengthStr(8000) 249.00 ns/op 297.00 ns/op 0.84
bitLength(250000) 207.00 ns/op 265.00 ns/op 0.78
bitLengthStr(250000) 279.00 ns/op 311.00 ns/op 0.90
floor - Math.floor (53) 1.2491 ns/op 1.2444 ns/op 1.00
floor - << 0 (53) 1.2473 ns/op 1.2431 ns/op 1.00
floor - Math.floor (512) 1.2439 ns/op 1.2434 ns/op 1.00
floor - << 0 (512) 1.2435 ns/op 1.2438 ns/op 1.00
fnIf(0) 1.5534 ns/op 1.5543 ns/op 1.00
fnSwitch(0) 2.1740 ns/op 2.1756 ns/op 1.00
fnObj(0) 1.5559 ns/op 1.5792 ns/op 0.99
fnArr(0) 1.5535 ns/op 1.5817 ns/op 0.98
fnIf(4) 2.2225 ns/op 2.1766 ns/op 1.02
fnSwitch(4) 2.1752 ns/op 2.1769 ns/op 1.00
fnObj(4) 1.5620 ns/op 1.5674 ns/op 1.00
fnArr(4) 1.5549 ns/op 1.5579 ns/op 1.00
fnIf(9) 3.1068 ns/op 3.1086 ns/op 1.00
fnSwitch(9) 2.2033 ns/op 2.1822 ns/op 1.01
fnObj(9) 1.5570 ns/op 1.5621 ns/op 1.00
fnArr(9) 1.5545 ns/op 1.5553 ns/op 1.00
Container {a,b,vec} - as struct x100000 124.50 us/op 124.67 us/op 1.00
Container {a,b,vec} - as tree x100000 530.16 us/op 532.84 us/op 0.99
Container {a,vec,b} - as struct x100000 155.63 us/op 155.80 us/op 1.00
Container {a,vec,b} - as tree x100000 497.65 us/op 503.38 us/op 0.99
get 2 props x1000000 - rawObject 312.33 us/op 311.26 us/op 1.00
get 2 props x1000000 - proxy 73.177 ms/op 75.486 ms/op 0.97
get 2 props x1000000 - customObj 311.63 us/op 311.17 us/op 1.00
Simple object binary -> struct 554.00 ns/op 919.00 ns/op 0.60
Simple object binary -> tree_backed 1.5410 us/op 2.4390 us/op 0.63
Simple object struct -> tree_backed 2.0370 us/op 2.8430 us/op 0.72
Simple object tree_backed -> struct 1.4390 us/op 1.9930 us/op 0.72
Simple object struct -> binary 827.00 ns/op 1.0970 us/op 0.75
Simple object tree_backed -> binary 1.2000 us/op 1.9160 us/op 0.63
aggregationBits binary -> struct 440.00 ns/op 703.00 ns/op 0.63
aggregationBits binary -> tree_backed 1.9210 us/op 2.7310 us/op 0.70
aggregationBits struct -> tree_backed 2.3000 us/op 3.2070 us/op 0.72
aggregationBits tree_backed -> struct 877.00 ns/op 1.2990 us/op 0.68
aggregationBits struct -> binary 655.00 ns/op 714.00 ns/op 0.92
aggregationBits tree_backed -> binary 778.00 ns/op 1.0160 us/op 0.77
List(uint8) 100000 binary -> struct 1.4002 ms/op 1.6494 ms/op 0.85
List(uint8) 100000 binary -> tree_backed 256.96 us/op 339.52 us/op 0.76
List(uint8) 100000 struct -> tree_backed 1.3917 ms/op 1.4676 ms/op 0.95
List(uint8) 100000 tree_backed -> struct 1.1625 ms/op 1.2180 ms/op 0.95
List(uint8) 100000 struct -> binary 1.1000 ms/op 1.2050 ms/op 0.91
List(uint8) 100000 tree_backed -> binary 104.31 us/op 109.59 us/op 0.95
List(uint64Number) 100000 binary -> struct 1.2909 ms/op 1.4993 ms/op 0.86
List(uint64Number) 100000 binary -> tree_backed 5.7327 ms/op 4.5535 ms/op 1.26
List(uint64Number) 100000 struct -> tree_backed 6.9479 ms/op 7.1613 ms/op 0.97
List(uint64Number) 100000 tree_backed -> struct 2.2423 ms/op 2.9460 ms/op 0.76
List(uint64Number) 100000 struct -> binary 1.4385 ms/op 1.8056 ms/op 0.80
List(uint64Number) 100000 tree_backed -> binary 942.72 us/op 1.0936 ms/op 0.86
List(Uint64Bigint) 100000 binary -> struct 3.4217 ms/op 4.1210 ms/op 0.83
List(Uint64Bigint) 100000 binary -> tree_backed 5.5817 ms/op 5.4431 ms/op 1.03
List(Uint64Bigint) 100000 struct -> tree_backed 7.5922 ms/op 7.7106 ms/op 0.98
List(Uint64Bigint) 100000 tree_backed -> struct 4.4770 ms/op 5.6203 ms/op 0.80
List(Uint64Bigint) 100000 struct -> binary 2.0699 ms/op 2.0891 ms/op 0.99
List(Uint64Bigint) 100000 tree_backed -> binary 991.66 us/op 1.8251 ms/op 0.54
Vector(Root) 100000 binary -> struct 40.049 ms/op 37.245 ms/op 1.08
Vector(Root) 100000 binary -> tree_backed 45.204 ms/op 42.026 ms/op 1.08
Vector(Root) 100000 struct -> tree_backed 50.376 ms/op 49.755 ms/op 1.01
Vector(Root) 100000 tree_backed -> struct 50.704 ms/op 50.143 ms/op 1.01
Vector(Root) 100000 struct -> binary 3.7255 ms/op 2.7521 ms/op 1.35
Vector(Root) 100000 tree_backed -> binary 7.8181 ms/op 7.7308 ms/op 1.01
List(Validator) 100000 binary -> struct 136.63 ms/op 111.36 ms/op 1.23
List(Validator) 100000 binary -> tree_backed 410.22 ms/op 387.51 ms/op 1.06
List(Validator) 100000 struct -> tree_backed 443.33 ms/op 400.61 ms/op 1.11
List(Validator) 100000 tree_backed -> struct 209.85 ms/op 204.14 ms/op 1.03
List(Validator) 100000 struct -> binary 30.776 ms/op 29.547 ms/op 1.04
List(Validator) 100000 tree_backed -> binary 99.172 ms/op 99.169 ms/op 1.00
List(Validator-NS) 100000 binary -> struct 144.13 ms/op 114.05 ms/op 1.26
List(Validator-NS) 100000 binary -> tree_backed 195.37 ms/op 190.85 ms/op 1.02
List(Validator-NS) 100000 struct -> tree_backed 227.97 ms/op 224.46 ms/op 1.02
List(Validator-NS) 100000 tree_backed -> struct 178.45 ms/op 173.86 ms/op 1.03
List(Validator-NS) 100000 struct -> binary 30.368 ms/op 29.662 ms/op 1.02
List(Validator-NS) 100000 tree_backed -> binary 35.821 ms/op 37.867 ms/op 0.95
get epochStatuses - MutableVector 93.097 us/op 115.24 us/op 0.81
get epochStatuses - ViewDU 176.50 us/op 194.01 us/op 0.91
set epochStatuses - ListTreeView 2.3042 ms/op 2.1869 ms/op 1.05
set epochStatuses - ListTreeView - set() 434.55 us/op 443.43 us/op 0.98
set epochStatuses - ListTreeView - commit() 715.53 us/op 784.12 us/op 0.91
bitstring 512.62 ns/op 516.62 ns/op 0.99
bit mask 12.942 ns/op 13.881 ns/op 0.93
struct - increase slot to 1000000 932.54 us/op 932.73 us/op 1.00
UintNumberType - increase slot to 1000000 27.020 ms/op 26.801 ms/op 1.01
UintBigintType - increase slot to 1000000 165.21 ms/op 205.69 ms/op 0.80
UintBigint8 x 100000 tree_deserialize 5.0015 ms/op 5.7488 ms/op 0.87
UintBigint8 x 100000 tree_serialize 613.17 us/op 625.27 us/op 0.98
UintBigint16 x 100000 tree_deserialize 5.0131 ms/op 6.4120 ms/op 0.78
UintBigint16 x 100000 tree_serialize 1.2996 ms/op 1.7094 ms/op 0.76
UintBigint32 x 100000 tree_deserialize 5.3581 ms/op 6.7822 ms/op 0.79
UintBigint32 x 100000 tree_serialize 1.6307 ms/op 2.1262 ms/op 0.77
UintBigint64 x 100000 tree_deserialize 6.4234 ms/op 7.8151 ms/op 0.82
UintBigint64 x 100000 tree_serialize 1.6669 ms/op 2.0621 ms/op 0.81
UintBigint8 x 100000 value_deserialize 435.49 us/op 436.34 us/op 1.00
UintBigint8 x 100000 value_serialize 699.26 us/op 859.14 us/op 0.81
UintBigint16 x 100000 value_deserialize 466.41 us/op 466.54 us/op 1.00
UintBigint16 x 100000 value_serialize 758.34 us/op 969.16 us/op 0.78
UintBigint32 x 100000 value_deserialize 503.00 us/op 497.83 us/op 1.01
UintBigint32 x 100000 value_serialize 766.99 us/op 1.0305 ms/op 0.74
UintBigint64 x 100000 value_deserialize 566.65 us/op 563.99 us/op 1.00
UintBigint64 x 100000 value_serialize 966.93 us/op 1.3526 ms/op 0.71
UintBigint8 x 100000 deserialize 3.3996 ms/op 4.0309 ms/op 0.84
UintBigint8 x 100000 serialize 1.6121 ms/op 1.6515 ms/op 0.98
UintBigint16 x 100000 deserialize 3.4282 ms/op 3.4411 ms/op 1.00
UintBigint16 x 100000 serialize 1.5972 ms/op 1.6215 ms/op 0.99
UintBigint32 x 100000 deserialize 3.1339 ms/op 3.5847 ms/op 0.87
UintBigint32 x 100000 serialize 2.8607 ms/op 3.1418 ms/op 0.91
UintBigint64 x 100000 deserialize 4.3048 ms/op 4.3650 ms/op 0.99
UintBigint64 x 100000 serialize 1.6155 ms/op 1.6272 ms/op 0.99
UintBigint128 x 100000 deserialize 5.8454 ms/op 5.7066 ms/op 1.02
UintBigint128 x 100000 serialize 14.089 ms/op 15.115 ms/op 0.93
UintBigint256 x 100000 deserialize 7.9146 ms/op 9.4140 ms/op 0.84
UintBigint256 x 100000 serialize 41.406 ms/op 43.538 ms/op 0.95
Slice from Uint8Array x25000 1.2152 ms/op 1.5021 ms/op 0.81
Slice from ArrayBuffer x25000 16.156 ms/op 16.764 ms/op 0.96
Slice from ArrayBuffer x25000 + new Uint8Array 17.117 ms/op 18.542 ms/op 0.92
Copy Uint8Array 100000 iterate 2.6592 ms/op 2.6700 ms/op 1.00
Copy Uint8Array 100000 slice 78.468 us/op 124.63 us/op 0.63
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 78.515 us/op 122.71 us/op 0.64
Copy Buffer 100000 Uint8Array.prototype.slice.call 78.597 us/op 124.49 us/op 0.63
Copy Uint8Array 100000 slice + set 163.23 us/op 250.69 us/op 0.65
Copy Uint8Array 100000 subarray + set 78.009 us/op 124.74 us/op 0.63
Copy Uint8Array 100000 slice arrayBuffer 78.690 us/op 128.49 us/op 0.61
Uint64 deserialize 100000 - iterate Uint8Array 1.8370 ms/op 2.1647 ms/op 0.85
Uint64 deserialize 100000 - by Uint32A 1.7622 ms/op 2.1301 ms/op 0.83
Uint64 deserialize 100000 - by DataView.getUint32 x2 1.9335 ms/op 2.1953 ms/op 0.88
Uint64 deserialize 100000 - by DataView.getBigUint64 4.7335 ms/op 5.3190 ms/op 0.89
Uint64 deserialize 100000 - by byte 40.548 ms/op 41.069 ms/op 0.99

by benchmarkbot/action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant