-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nazarhussain
changed the title
test: migrate from mocha to vitest
chore: migrate from mocha to vitest
Nov 11, 2024
|
Benchmark suite | Current: ed12dac | Previous: b85c774 | Ratio |
---|---|---|---|
BeaconState.currentEpochParticipation vc 300000 - deserialize tree | 1.1360 ms/op | 352.45 us/op | 3.22 |
List(uint8) 100000 binary -> tree_backed | 312.11 us/op | 93.457 us/op | 3.34 |
Full benchmark results
Benchmark suite | Current: ed12dac | Previous: b85c774 | Ratio |
---|---|---|---|
digestTwoHashObjects 50023 times | 48.284 ms/op | 48.536 ms/op | 0.99 |
digest64 50023 times | 54.324 ms/op | 53.508 ms/op | 1.02 |
digest 50023 times | 55.436 ms/op | 55.222 ms/op | 1.00 |
input length 32 | 1.2330 us/op | 1.2570 us/op | 0.98 |
input length 64 | 1.3550 us/op | 1.3470 us/op | 1.01 |
input length 128 | 2.2970 us/op | 2.2830 us/op | 1.01 |
input length 256 | 3.4610 us/op | 3.3960 us/op | 1.02 |
input length 512 | 5.6700 us/op | 5.6350 us/op | 1.01 |
input length 1024 | 10.862 us/op | 10.798 us/op | 1.01 |
digest 1000000 times | 876.87 ms/op | 878.26 ms/op | 1.00 |
hashObjectToByteArray 50023 times | 1.7084 ms/op | 1.7190 ms/op | 0.99 |
byteArrayToHashObject 50023 times | 2.3259 ms/op | 2.3234 ms/op | 1.00 |
digest64 200092 times | 225.25 ms/op | 216.85 ms/op | 1.04 |
hash 200092 times using batchHash4UintArray64s | 244.68 ms/op | 236.53 ms/op | 1.03 |
digest64HashObjects 200092 times | 196.36 ms/op | 195.25 ms/op | 1.01 |
hash 200092 times using batchHash4HashObjectInputs | 206.65 ms/op | 203.70 ms/op | 1.01 |
getGindicesAtDepth | 4.3530 us/op | 4.2560 us/op | 1.02 |
iterateAtDepth | 7.8860 us/op | 7.7310 us/op | 1.02 |
getGindexBits | 473.00 ns/op | 470.00 ns/op | 1.01 |
gindexIterator | 1.0740 us/op | 1.0910 us/op | 0.98 |
HashComputationLevel.push then loop | 26.869 ms/op | 27.975 ms/op | 0.96 |
HashComputation[] push then loop | 48.952 ms/op | 48.481 ms/op | 1.01 |
hash 2 Uint8Array 500000 times - as-sha256 | 546.43 ms/op | 544.36 ms/op | 1.00 |
hashTwoObjects 500000 times - as-sha256 | 504.24 ms/op | 511.80 ms/op | 0.99 |
executeHashComputations - as-sha256 | 50.192 ms/op | 45.956 ms/op | 1.09 |
hash 2 Uint8Array 500000 times - noble | 1.2256 s/op | 1.1845 s/op | 1.03 |
hashTwoObjects 500000 times - noble | 1.7101 s/op | 1.6264 s/op | 1.05 |
executeHashComputations - noble | 40.448 ms/op | 41.576 ms/op | 0.97 |
hash 2 Uint8Array 500000 times - hashtree | 228.63 ms/op | 222.41 ms/op | 1.03 |
hashTwoObjects 500000 times - hashtree | 212.67 ms/op | 214.51 ms/op | 0.99 |
executeHashComputations - hashtree | 11.476 ms/op | 11.231 ms/op | 1.02 |
getHashComputations | 2.9817 ms/op | 2.8547 ms/op | 1.04 |
executeHashComputations | 11.123 ms/op | 11.876 ms/op | 0.94 |
get root | 17.538 ms/op | 16.253 ms/op | 1.08 |
getNodeH() x7812.5 avg hindex | 15.521 us/op | 12.155 us/op | 1.28 |
getNodeH() x7812.5 index 0 | 6.2410 us/op | 6.2880 us/op | 0.99 |
getNodeH() x7812.5 index 7 | 6.2330 us/op | 6.2560 us/op | 1.00 |
getNodeH() x7812.5 index 7 with key array | 6.2350 us/op | 6.2610 us/op | 1.00 |
new LeafNode() x7812.5 | 14.666 us/op | 14.757 us/op | 0.99 |
getHashComputations 250000 nodes | 19.339 ms/op | 19.764 ms/op | 0.98 |
batchHash 250000 nodes | 93.013 ms/op | 88.754 ms/op | 1.05 |
get root 250000 nodes | 122.60 ms/op | 114.77 ms/op | 1.07 |
getHashComputations 500000 nodes | 29.962 ms/op | 29.380 ms/op | 1.02 |
batchHash 500000 nodes | 163.66 ms/op | 151.99 ms/op | 1.08 |
get root 500000 nodes | 248.72 ms/op | 239.31 ms/op | 1.04 |
getHashComputations 1000000 nodes | 61.370 ms/op | 86.429 ms/op | 0.71 |
batchHash 1000000 nodes | 356.60 ms/op | 348.27 ms/op | 1.02 |
get root 1000000 nodes | 484.52 ms/op | 453.36 ms/op | 1.07 |
multiproof - depth 15, 1 requested leaves | 8.9190 us/op | 8.5830 us/op | 1.04 |
tree offset multiproof - depth 15, 1 requested leaves | 18.840 us/op | 17.973 us/op | 1.05 |
compact multiproof - depth 15, 1 requested leaves | 4.0210 us/op | 3.4940 us/op | 1.15 |
multiproof - depth 15, 2 requested leaves | 12.923 us/op | 12.223 us/op | 1.06 |
tree offset multiproof - depth 15, 2 requested leaves | 22.345 us/op | 21.601 us/op | 1.03 |
compact multiproof - depth 15, 2 requested leaves | 3.9900 us/op | 3.5190 us/op | 1.13 |
multiproof - depth 15, 3 requested leaves | 16.932 us/op | 16.742 us/op | 1.01 |
tree offset multiproof - depth 15, 3 requested leaves | 27.956 us/op | 27.898 us/op | 1.00 |
compact multiproof - depth 15, 3 requested leaves | 4.9210 us/op | 4.1800 us/op | 1.18 |
multiproof - depth 15, 4 requested leaves | 23.475 us/op | 22.017 us/op | 1.07 |
tree offset multiproof - depth 15, 4 requested leaves | 37.494 us/op | 34.892 us/op | 1.07 |
compact multiproof - depth 15, 4 requested leaves | 6.1350 us/op | 4.8890 us/op | 1.25 |
packedRootsBytesToLeafNodes bytes 4000 offset 0 | 2.2270 us/op | 2.1290 us/op | 1.05 |
packedRootsBytesToLeafNodes bytes 4000 offset 1 | 2.2210 us/op | 2.1010 us/op | 1.06 |
packedRootsBytesToLeafNodes bytes 4000 offset 2 | 2.2400 us/op | 2.1210 us/op | 1.06 |
packedRootsBytesToLeafNodes bytes 4000 offset 3 | 2.1740 us/op | 2.1080 us/op | 1.03 |
subtreeFillToContents depth 40 count 250000 | 44.233 ms/op | 45.620 ms/op | 0.97 |
setRoot - gindexBitstring | 8.8181 ms/op | 8.7088 ms/op | 1.01 |
setRoot - gindex | 9.3777 ms/op | 9.3895 ms/op | 1.00 |
getRoot - gindexBitstring | 2.4843 ms/op | 2.5720 ms/op | 0.97 |
getRoot - gindex | 3.2893 ms/op | 3.2986 ms/op | 1.00 |
getHashObject then setHashObject | 10.314 ms/op | 10.232 ms/op | 1.01 |
setNodeWithFn | 7.7776 ms/op | 7.8345 ms/op | 0.99 |
getNodeAtDepth depth 0 x100000 | 1.1173 ms/op | 1.1311 ms/op | 0.99 |
setNodeAtDepth depth 0 x100000 | 2.4433 ms/op | 2.4777 ms/op | 0.99 |
getNodesAtDepth depth 0 x100000 | 1.0531 ms/op | 1.0529 ms/op | 1.00 |
setNodesAtDepth depth 0 x100000 | 1.5158 ms/op | 1.5167 ms/op | 1.00 |
getNodeAtDepth depth 1 x100000 | 1.1814 ms/op | 1.1853 ms/op | 1.00 |
setNodeAtDepth depth 1 x100000 | 5.2142 ms/op | 5.3263 ms/op | 0.98 |
getNodesAtDepth depth 1 x100000 | 1.1765 ms/op | 1.1778 ms/op | 1.00 |
setNodesAtDepth depth 1 x100000 | 4.4323 ms/op | 4.4690 ms/op | 0.99 |
getNodeAtDepth depth 2 x100000 | 1.4548 ms/op | 1.4546 ms/op | 1.00 |
setNodeAtDepth depth 2 x100000 | 9.1345 ms/op | 9.4026 ms/op | 0.97 |
getNodesAtDepth depth 2 x100000 | 18.128 ms/op | 18.158 ms/op | 1.00 |
setNodesAtDepth depth 2 x100000 | 13.175 ms/op | 13.590 ms/op | 0.97 |
tree.getNodesAtDepth - gindexes | 7.9532 ms/op | 7.2915 ms/op | 1.09 |
tree.getNodesAtDepth - push all nodes | 1.8907 ms/op | 1.9092 ms/op | 0.99 |
tree.getNodesAtDepth - navigation | 235.72 us/op | 233.78 us/op | 1.01 |
tree.setNodesAtDepth - indexes | 426.48 us/op | 427.36 us/op | 1.00 |
set at depth 8 | 453.00 ns/op | 507.00 ns/op | 0.89 |
set at depth 16 | 599.00 ns/op | 650.00 ns/op | 0.92 |
set at depth 32 | 931.00 ns/op | 994.00 ns/op | 0.94 |
iterateNodesAtDepth 8 256 | 13.441 us/op | 13.185 us/op | 1.02 |
getNodesAtDepth 8 256 | 3.4670 us/op | 3.3670 us/op | 1.03 |
iterateNodesAtDepth 16 65536 | 4.3085 ms/op | 4.1300 ms/op | 1.04 |
getNodesAtDepth 16 65536 | 1.5703 ms/op | 1.6244 ms/op | 0.97 |
iterateNodesAtDepth 32 250000 | 15.876 ms/op | 15.374 ms/op | 1.03 |
getNodesAtDepth 32 250000 | 4.3058 ms/op | 4.3443 ms/op | 0.99 |
iterateNodesAtDepth 40 250000 | 15.695 ms/op | 15.390 ms/op | 1.02 |
getNodesAtDepth 40 250000 | 4.3610 ms/op | 4.3523 ms/op | 1.00 |
250000 validators root getter | 119.98 ms/op | 127.33 ms/op | 0.94 |
250000 validators batchHash() | 85.609 ms/op | 87.862 ms/op | 0.97 |
250000 validators hashComputations | 17.142 ms/op | 15.418 ms/op | 1.11 |
bitlist bytes to struct (120,90) | 1.1000 us/op | 1.0560 us/op | 1.04 |
bitlist bytes to tree (120,90) | 4.3200 us/op | 3.8980 us/op | 1.11 |
bitlist bytes to struct (2048,2048) | 1.4610 us/op | 1.4220 us/op | 1.03 |
bitlist bytes to tree (2048,2048) | 6.4210 us/op | 5.6990 us/op | 1.13 |
ByteListType - deserialize | 8.2661 ms/op | 8.3725 ms/op | 0.99 |
BasicListType - deserialize | 19.049 ms/op | 19.068 ms/op | 1.00 |
ByteListType - serialize | 8.3747 ms/op | 7.6498 ms/op | 1.09 |
BasicListType - serialize | 11.710 ms/op | 10.823 ms/op | 1.08 |
BasicListType - tree_convertToStruct | 31.956 ms/op | 31.191 ms/op | 1.02 |
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate | 4.7421 ms/op | 4.7460 ms/op | 1.00 |
List[uint8, 68719476736] len 300000 ViewDU.get(i) | 4.3920 ms/op | 3.9898 ms/op | 1.10 |
Array.push len 300000 empty Array - number | 6.7327 ms/op | 6.4853 ms/op | 1.04 |
Array.set len 300000 from new Array - number | 1.7619 ms/op | 1.7454 ms/op | 1.01 |
Array.set len 300000 - number | 5.4973 ms/op | 5.2574 ms/op | 1.05 |
Uint8Array.set len 300000 | 485.99 us/op | 471.64 us/op | 1.03 |
Uint32Array.set len 300000 | 572.04 us/op | 538.88 us/op | 1.06 |
Container({a: uint8, b: uint8}) getViewDU x300000 | 46.951 ms/op | 44.601 ms/op | 1.05 |
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 | 10.717 ms/op | 10.931 ms/op | 0.98 |
List(Container) len 300000 ViewDU.getAllReadonly() + iterate | 209.07 ms/op | 198.91 ms/op | 1.05 |
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate | 260.77 ms/op | 235.32 ms/op | 1.11 |
List(Container) len 300000 ViewDU.get(i) | 6.3968 ms/op | 6.3482 ms/op | 1.01 |
List(Container) len 300000 ViewDU.getReadonly(i) | 6.2298 ms/op | 6.1997 ms/op | 1.00 |
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate | 39.785 ms/op | 33.690 ms/op | 1.18 |
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate | 5.4065 ms/op | 5.3752 ms/op | 1.01 |
List(ContainerNodeStruct) len 300000 ViewDU.get(i) | 6.0996 ms/op | 5.9631 ms/op | 1.02 |
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) | 5.9507 ms/op | 5.8283 ms/op | 1.02 |
Array.push len 300000 empty Array - object | 6.1316 ms/op | 5.8887 ms/op | 1.04 |
Array.set len 300000 from new Array - object | 2.1377 ms/op | 2.1849 ms/op | 0.98 |
Array.set len 300000 - object | 6.8927 ms/op | 5.5874 ms/op | 1.23 |
cachePermanentRootStruct no cache | 5.5060 us/op | 5.4560 us/op | 1.01 |
cachePermanentRootStruct with cache | 215.00 ns/op | 202.00 ns/op | 1.06 |
epochParticipation len 250000 rws 7813 | 2.5502 ms/op | 2.1532 ms/op | 1.18 |
BeaconState ViewDU hashTreeRoot() vc=200000 | 113.89 ms/op | 101.87 ms/op | 1.12 |
BeaconState ViewDU recursive hash - commit step vc=200000 | 4.6774 ms/op | 4.3848 ms/op | 1.07 |
BeaconState ViewDU validator tree creation vc=10000 | 42.022 ms/op | 34.236 ms/op | 1.23 |
BeaconState ViewDU batchHashTreeRoot vc=200000 | 105.84 ms/op | 92.554 ms/op | 1.14 |
BeaconState ViewDU hashTreeRoot - commit step vc=200000 | 90.819 ms/op | 78.884 ms/op | 1.15 |
BeaconState ViewDU hashTreeRoot - hash step vc=200000 | 17.057 ms/op | 14.985 ms/op | 1.14 |
deserialize Attestation - tree | 5.3730 us/op | 4.1470 us/op | 1.30 |
deserialize Attestation - struct | 1.8520 us/op | 1.8640 us/op | 0.99 |
deserialize SignedAggregateAndProof - tree | 5.7800 us/op | 3.8120 us/op | 1.52 |
deserialize SignedAggregateAndProof - struct | 3.1890 us/op | 2.9570 us/op | 1.08 |
deserialize SyncCommitteeMessage - tree | 1.6080 us/op | 1.1210 us/op | 1.43 |
deserialize SyncCommitteeMessage - struct | 1.1120 us/op | 1.1400 us/op | 0.98 |
deserialize SignedContributionAndProof - tree | 3.2190 us/op | 2.1480 us/op | 1.50 |
deserialize SignedContributionAndProof - struct | 2.2340 us/op | 2.2630 us/op | 0.99 |
deserialize SignedBeaconBlock - tree | 330.74 us/op | 214.56 us/op | 1.54 |
deserialize SignedBeaconBlock - struct | 129.70 us/op | 118.17 us/op | 1.10 |
BeaconState vc 300000 - deserialize tree | 656.28 ms/op | 581.90 ms/op | 1.13 |
BeaconState vc 300000 - serialize tree | 144.32 ms/op | 120.60 ms/op | 1.20 |
BeaconState.historicalRoots vc 300000 - deserialize tree | 915.00 ns/op | 802.00 ns/op | 1.14 |
BeaconState.historicalRoots vc 300000 - serialize tree | 673.00 ns/op | 649.00 ns/op | 1.04 |
BeaconState.validators vc 300000 - deserialize tree | 627.24 ms/op | 576.85 ms/op | 1.09 |
BeaconState.validators vc 300000 - serialize tree | 106.21 ms/op | 103.76 ms/op | 1.02 |
BeaconState.balances vc 300000 - deserialize tree | 30.783 ms/op | 22.639 ms/op | 1.36 |
BeaconState.balances vc 300000 - serialize tree | 4.3218 ms/op | 3.3771 ms/op | 1.28 |
BeaconState.previousEpochParticipation vc 300000 - deserialize tree | 1.0531 ms/op | 351.09 us/op | 3.00 |
BeaconState.previousEpochParticipation vc 300000 - serialize tree | 336.93 us/op | 294.11 us/op | 1.15 |
BeaconState.currentEpochParticipation vc 300000 - deserialize tree | 1.1360 ms/op | 352.45 us/op | 3.22 |
BeaconState.currentEpochParticipation vc 300000 - serialize tree | 335.92 us/op | 292.25 us/op | 1.15 |
BeaconState.inactivityScores vc 300000 - deserialize tree | 28.101 ms/op | 22.947 ms/op | 1.22 |
BeaconState.inactivityScores vc 300000 - serialize tree | 6.9696 ms/op | 3.7328 ms/op | 1.87 |
hashTreeRoot Attestation - struct | 27.886 us/op | 23.982 us/op | 1.16 |
hashTreeRoot Attestation - tree | 8.8990 us/op | 9.3390 us/op | 0.95 |
hashTreeRoot SignedAggregateAndProof - struct | 41.358 us/op | 27.461 us/op | 1.51 |
hashTreeRoot SignedAggregateAndProof - tree | 13.140 us/op | 12.785 us/op | 1.03 |
hashTreeRoot SyncCommitteeMessage - struct | 10.478 us/op | 7.1710 us/op | 1.46 |
hashTreeRoot SyncCommitteeMessage - tree | 3.4790 us/op | 3.1890 us/op | 1.09 |
hashTreeRoot SignedContributionAndProof - struct | 27.350 us/op | 16.279 us/op | 1.68 |
hashTreeRoot SignedContributionAndProof - tree | 9.0870 us/op | 8.8600 us/op | 1.03 |
hashTreeRoot SignedBeaconBlock - struct | 1.7455 ms/op | 1.3098 ms/op | 1.33 |
hashTreeRoot SignedBeaconBlock - tree | 808.60 us/op | 769.95 us/op | 1.05 |
hashTreeRoot Validator - struct | 10.624 us/op | 7.8960 us/op | 1.35 |
hashTreeRoot Validator - tree | 8.9520 us/op | 6.4460 us/op | 1.39 |
BeaconState vc 300000 - hashTreeRoot tree | 2.5100 s/op | 2.1253 s/op | 1.18 |
BeaconState vc 300000 - batchHashTreeRoot tree | 4.1235 s/op | 3.4322 s/op | 1.20 |
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree | 1.2460 us/op | 1000.0 ns/op | 1.25 |
BeaconState.validators vc 300000 - hashTreeRoot tree | 2.4582 s/op | 2.0762 s/op | 1.18 |
BeaconState.balances vc 300000 - hashTreeRoot tree | 36.564 ms/op | 32.424 ms/op | 1.13 |
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree | 4.1299 ms/op | 4.0562 ms/op | 1.02 |
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree | 4.1403 ms/op | 4.0246 ms/op | 1.03 |
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree | 33.789 ms/op | 36.705 ms/op | 0.92 |
hash64 x18 | 11.012 us/op | 10.087 us/op | 1.09 |
hashTwoObjects x18 | 8.6740 us/op | 8.7350 us/op | 0.99 |
hash64 x1740 | 855.56 us/op | 813.85 us/op | 1.05 |
hashTwoObjects x1740 | 805.06 us/op | 792.83 us/op | 1.02 |
hash64 x2700000 | 1.3649 s/op | 1.2765 s/op | 1.07 |
hashTwoObjects x2700000 | 1.2558 s/op | 1.2532 s/op | 1.00 |
get_exitEpoch - ContainerType | 256.00 ns/op | 218.00 ns/op | 1.17 |
get_exitEpoch - ContainerNodeStructType | 271.00 ns/op | 218.00 ns/op | 1.24 |
set_exitEpoch - ContainerType | 275.00 ns/op | 227.00 ns/op | 1.21 |
set_exitEpoch - ContainerNodeStructType | 274.00 ns/op | 229.00 ns/op | 1.20 |
get_pubkey - ContainerType | 1.1330 us/op | 874.00 ns/op | 1.30 |
get_pubkey - ContainerNodeStructType | 272.00 ns/op | 215.00 ns/op | 1.27 |
hashTreeRoot - ContainerType | 467.00 ns/op | 399.00 ns/op | 1.17 |
hashTreeRoot - ContainerNodeStructType | 460.00 ns/op | 424.00 ns/op | 1.08 |
createProof - ContainerType | 4.3950 us/op | 3.9640 us/op | 1.11 |
createProof - ContainerNodeStructType | 25.930 us/op | 20.130 us/op | 1.29 |
serialize - ContainerType | 2.1800 us/op | 1.8220 us/op | 1.20 |
serialize - ContainerNodeStructType | 1.7650 us/op | 1.3470 us/op | 1.31 |
set_exitEpoch_and_hashTreeRoot - ContainerType | 3.0030 us/op | 2.5340 us/op | 1.19 |
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType | 8.6470 us/op | 6.7930 us/op | 1.27 |
Array - for of | 5.5820 us/op | 5.5260 us/op | 1.01 |
Array - for(;;) | 5.5450 us/op | 5.5120 us/op | 1.01 |
basicListValue.readonlyValuesArray() | 8.0603 ms/op | 4.2127 ms/op | 1.91 |
basicListValue.readonlyValuesArray() + loop all | 8.6895 ms/op | 4.3204 ms/op | 2.01 |
compositeListValue.readonlyValuesArray() | 27.894 ms/op | 25.619 ms/op | 1.09 |
compositeListValue.readonlyValuesArray() + loop all | 31.321 ms/op | 28.646 ms/op | 1.09 |
Number64UintType - get balances list | 5.8299 ms/op | 4.1201 ms/op | 1.41 |
Number64UintType - set balances list | 10.233 ms/op | 10.071 ms/op | 1.02 |
Number64UintType - get and increase 10 then set | 48.031 ms/op | 40.437 ms/op | 1.19 |
Number64UintType - increase 10 using applyDelta | 17.020 ms/op | 16.219 ms/op | 1.05 |
Number64UintType - increase 10 using applyDeltaInBatch | 17.374 ms/op | 15.821 ms/op | 1.10 |
tree_newTreeFromUint64Deltas | 18.873 ms/op | 15.837 ms/op | 1.19 |
unsafeUint8ArrayToTree | 40.625 ms/op | 31.503 ms/op | 1.29 |
bitLength(50) | 266.00 ns/op | 224.00 ns/op | 1.19 |
bitLengthStr(50) | 234.00 ns/op | 206.00 ns/op | 1.14 |
bitLength(8000) | 252.00 ns/op | 206.00 ns/op | 1.22 |
bitLengthStr(8000) | 290.00 ns/op | 260.00 ns/op | 1.12 |
bitLength(250000) | 265.00 ns/op | 206.00 ns/op | 1.29 |
bitLengthStr(250000) | 308.00 ns/op | 284.00 ns/op | 1.08 |
floor - Math.floor (53) | 1.2370 ns/op | 1.2351 ns/op | 1.00 |
floor - << 0 (53) | 1.2372 ns/op | 1.2370 ns/op | 1.00 |
floor - Math.floor (512) | 1.2376 ns/op | 1.2402 ns/op | 1.00 |
floor - << 0 (512) | 1.2380 ns/op | 1.2370 ns/op | 1.00 |
fnIf(0) | 1.5492 ns/op | 1.5484 ns/op | 1.00 |
fnSwitch(0) | 2.1672 ns/op | 2.2014 ns/op | 0.98 |
fnObj(0) | 1.5514 ns/op | 1.5470 ns/op | 1.00 |
fnArr(0) | 1.5472 ns/op | 1.5471 ns/op | 1.00 |
fnIf(4) | 2.1643 ns/op | 2.1656 ns/op | 1.00 |
fnSwitch(4) | 2.1675 ns/op | 2.1653 ns/op | 1.00 |
fnObj(4) | 1.5538 ns/op | 1.5520 ns/op | 1.00 |
fnArr(4) | 1.5489 ns/op | 1.5516 ns/op | 1.00 |
fnIf(9) | 3.0929 ns/op | 3.0919 ns/op | 1.00 |
fnSwitch(9) | 2.1706 ns/op | 2.1642 ns/op | 1.00 |
fnObj(9) | 1.5820 ns/op | 1.5467 ns/op | 1.02 |
fnArr(9) | 1.5475 ns/op | 1.5465 ns/op | 1.00 |
Container {a,b,vec} - as struct x100000 | 123.83 us/op | 123.92 us/op | 1.00 |
Container {a,b,vec} - as tree x100000 | 402.23 us/op | 340.57 us/op | 1.18 |
Container {a,vec,b} - as struct x100000 | 154.78 us/op | 155.13 us/op | 1.00 |
Container {a,vec,b} - as tree x100000 | 402.31 us/op | 371.57 us/op | 1.08 |
get 2 props x1000000 - rawObject | 309.60 us/op | 309.67 us/op | 1.00 |
get 2 props x1000000 - proxy | 72.728 ms/op | 72.876 ms/op | 1.00 |
get 2 props x1000000 - customObj | 309.68 us/op | 309.55 us/op | 1.00 |
Simple object binary -> struct | 708.00 ns/op | 710.00 ns/op | 1.00 |
Simple object binary -> tree_backed | 1.6040 us/op | 1.3720 us/op | 1.17 |
Simple object struct -> tree_backed | 2.2160 us/op | 1.9870 us/op | 1.12 |
Simple object tree_backed -> struct | 1.9500 us/op | 1.8870 us/op | 1.03 |
Simple object struct -> binary | 952.00 ns/op | 934.00 ns/op | 1.02 |
Simple object tree_backed -> binary | 1.6380 us/op | 1.6330 us/op | 1.00 |
aggregationBits binary -> struct | 641.00 ns/op | 650.00 ns/op | 0.99 |
aggregationBits binary -> tree_backed | 2.7900 us/op | 2.5040 us/op | 1.11 |
aggregationBits struct -> tree_backed | 3.2140 us/op | 2.8930 us/op | 1.11 |
aggregationBits tree_backed -> struct | 1.3040 us/op | 1.2520 us/op | 1.04 |
aggregationBits struct -> binary | 818.00 ns/op | 809.00 ns/op | 1.01 |
aggregationBits tree_backed -> binary | 1.0950 us/op | 1.0750 us/op | 1.02 |
List(uint8) 100000 binary -> struct | 1.5934 ms/op | 1.5750 ms/op | 1.01 |
List(uint8) 100000 binary -> tree_backed | 312.11 us/op | 93.457 us/op | 3.34 |
List(uint8) 100000 struct -> tree_backed | 1.4230 ms/op | 1.1718 ms/op | 1.21 |
List(uint8) 100000 tree_backed -> struct | 1.2518 ms/op | 1.1461 ms/op | 1.09 |
List(uint8) 100000 struct -> binary | 1.0209 ms/op | 1.0313 ms/op | 0.99 |
List(uint8) 100000 tree_backed -> binary | 106.39 us/op | 92.057 us/op | 1.16 |
List(uint64Number) 100000 binary -> struct | 1.3006 ms/op | 1.2073 ms/op | 1.08 |
List(uint64Number) 100000 binary -> tree_backed | 4.2389 ms/op | 2.4318 ms/op | 1.74 |
List(uint64Number) 100000 struct -> tree_backed | 6.1102 ms/op | 4.1740 ms/op | 1.46 |
List(uint64Number) 100000 tree_backed -> struct | 2.4615 ms/op | 2.2072 ms/op | 1.12 |
List(uint64Number) 100000 struct -> binary | 1.4936 ms/op | 1.3973 ms/op | 1.07 |
List(uint64Number) 100000 tree_backed -> binary | 1.0056 ms/op | 914.01 us/op | 1.10 |
List(Uint64Bigint) 100000 binary -> struct | 3.8390 ms/op | 3.5588 ms/op | 1.08 |
List(Uint64Bigint) 100000 binary -> tree_backed | 5.1944 ms/op | 3.3438 ms/op | 1.55 |
List(Uint64Bigint) 100000 struct -> tree_backed | 7.3680 ms/op | 4.6908 ms/op | 1.57 |
List(Uint64Bigint) 100000 tree_backed -> struct | 4.6838 ms/op | 4.2703 ms/op | 1.10 |
List(Uint64Bigint) 100000 struct -> binary | 2.0531 ms/op | 2.0126 ms/op | 1.02 |
List(Uint64Bigint) 100000 tree_backed -> binary | 1.0578 ms/op | 951.41 us/op | 1.11 |
Vector(Root) 100000 binary -> struct | 34.786 ms/op | 31.637 ms/op | 1.10 |
Vector(Root) 100000 binary -> tree_backed | 38.987 ms/op | 26.588 ms/op | 1.47 |
Vector(Root) 100000 struct -> tree_backed | 51.550 ms/op | 42.917 ms/op | 1.20 |
Vector(Root) 100000 tree_backed -> struct | 51.724 ms/op | 49.612 ms/op | 1.04 |
Vector(Root) 100000 struct -> binary | 2.7187 ms/op | 2.7788 ms/op | 0.98 |
Vector(Root) 100000 tree_backed -> binary | 10.080 ms/op | 8.5391 ms/op | 1.18 |
List(Validator) 100000 binary -> struct | 113.45 ms/op | 103.41 ms/op | 1.10 |
List(Validator) 100000 binary -> tree_backed | 369.08 ms/op | 275.64 ms/op | 1.34 |
List(Validator) 100000 struct -> tree_backed | 382.92 ms/op | 310.87 ms/op | 1.23 |
List(Validator) 100000 tree_backed -> struct | 215.77 ms/op | 211.56 ms/op | 1.02 |
List(Validator) 100000 struct -> binary | 30.155 ms/op | 27.227 ms/op | 1.11 |
List(Validator) 100000 tree_backed -> binary | 119.11 ms/op | 111.06 ms/op | 1.07 |
List(Validator-NS) 100000 binary -> struct | 106.73 ms/op | 107.96 ms/op | 0.99 |
List(Validator-NS) 100000 binary -> tree_backed | 166.89 ms/op | 132.67 ms/op | 1.26 |
List(Validator-NS) 100000 struct -> tree_backed | 215.37 ms/op | 197.03 ms/op | 1.09 |
List(Validator-NS) 100000 tree_backed -> struct | 179.25 ms/op | 168.35 ms/op | 1.06 |
List(Validator-NS) 100000 struct -> binary | 30.316 ms/op | 27.103 ms/op | 1.12 |
List(Validator-NS) 100000 tree_backed -> binary | 34.974 ms/op | 34.881 ms/op | 1.00 |
get epochStatuses - MutableVector | 96.186 us/op | 97.303 us/op | 0.99 |
get epochStatuses - ViewDU | 205.54 us/op | 200.64 us/op | 1.02 |
set epochStatuses - ListTreeView | 2.1817 ms/op | 2.4405 ms/op | 0.89 |
set epochStatuses - ListTreeView - set() | 446.79 us/op | 436.55 us/op | 1.02 |
set epochStatuses - ListTreeView - commit() | 780.45 us/op | 535.09 us/op | 1.46 |
bitstring | 644.60 ns/op | 634.23 ns/op | 1.02 |
bit mask | 13.669 ns/op | 14.174 ns/op | 0.96 |
struct - increase slot to 1000000 | 928.07 us/op | 927.78 us/op | 1.00 |
UintNumberType - increase slot to 1000000 | 21.676 ms/op | 21.532 ms/op | 1.01 |
UintBigintType - increase slot to 1000000 | 179.35 ms/op | 165.80 ms/op | 1.08 |
UintBigint8 x 100000 tree_deserialize | 6.9926 ms/op | 5.3078 ms/op | 1.32 |
UintBigint8 x 100000 tree_serialize | 1.1805 ms/op | 1.1525 ms/op | 1.02 |
UintBigint16 x 100000 tree_deserialize | 7.1320 ms/op | 4.4636 ms/op | 1.60 |
UintBigint16 x 100000 tree_serialize | 1.2659 ms/op | 1.1993 ms/op | 1.06 |
UintBigint32 x 100000 tree_deserialize | 7.5226 ms/op | 4.7785 ms/op | 1.57 |
UintBigint32 x 100000 tree_serialize | 1.6574 ms/op | 1.2069 ms/op | 1.37 |
UintBigint64 x 100000 tree_deserialize | 8.1791 ms/op | 5.4742 ms/op | 1.49 |
UintBigint64 x 100000 tree_serialize | 1.7304 ms/op | 1.5943 ms/op | 1.09 |
UintBigint8 x 100000 value_deserialize | 433.16 us/op | 433.56 us/op | 1.00 |
UintBigint8 x 100000 value_serialize | 748.19 us/op | 650.98 us/op | 1.15 |
UintBigint16 x 100000 value_deserialize | 464.03 us/op | 464.34 us/op | 1.00 |
UintBigint16 x 100000 value_serialize | 735.81 us/op | 681.64 us/op | 1.08 |
UintBigint32 x 100000 value_deserialize | 433.12 us/op | 433.10 us/op | 1.00 |
UintBigint32 x 100000 value_serialize | 787.12 us/op | 720.41 us/op | 1.09 |
UintBigint64 x 100000 value_deserialize | 496.29 us/op | 496.29 us/op | 1.00 |
UintBigint64 x 100000 value_serialize | 963.63 us/op | 900.86 us/op | 1.07 |
UintBigint8 x 100000 deserialize | 3.4331 ms/op | 2.8535 ms/op | 1.20 |
UintBigint8 x 100000 serialize | 1.5597 ms/op | 1.7818 ms/op | 0.88 |
UintBigint16 x 100000 deserialize | 3.3278 ms/op | 2.8839 ms/op | 1.15 |
UintBigint16 x 100000 serialize | 1.5495 ms/op | 1.4988 ms/op | 1.03 |
UintBigint32 x 100000 deserialize | 3.3896 ms/op | 2.9676 ms/op | 1.14 |
UintBigint32 x 100000 serialize | 2.9438 ms/op | 2.6620 ms/op | 1.11 |
UintBigint64 x 100000 deserialize | 4.1541 ms/op | 3.9316 ms/op | 1.06 |
UintBigint64 x 100000 serialize | 1.5543 ms/op | 1.5189 ms/op | 1.02 |
UintBigint128 x 100000 deserialize | 5.9672 ms/op | 4.9649 ms/op | 1.20 |
UintBigint128 x 100000 serialize | 15.128 ms/op | 13.794 ms/op | 1.10 |
UintBigint256 x 100000 deserialize | 8.9674 ms/op | 7.7769 ms/op | 1.15 |
UintBigint256 x 100000 serialize | 44.154 ms/op | 41.308 ms/op | 1.07 |
Slice from Uint8Array x25000 | 1.3428 ms/op | 1.2228 ms/op | 1.10 |
Slice from ArrayBuffer x25000 | 16.854 ms/op | 15.136 ms/op | 1.11 |
Slice from ArrayBuffer x25000 + new Uint8Array | 19.278 ms/op | 15.596 ms/op | 1.24 |
Copy Uint8Array 100000 iterate | 2.6179 ms/op | 2.5895 ms/op | 1.01 |
Copy Uint8Array 100000 slice | 116.24 us/op | 124.44 us/op | 0.93 |
Copy Uint8Array 100000 Uint8Array.prototype.slice.call | 116.78 us/op | 123.96 us/op | 0.94 |
Copy Buffer 100000 Uint8Array.prototype.slice.call | 117.83 us/op | 124.16 us/op | 0.95 |
Copy Uint8Array 100000 slice + set | 223.30 us/op | 192.06 us/op | 1.16 |
Copy Uint8Array 100000 subarray + set | 115.76 us/op | 122.50 us/op | 0.94 |
Copy Uint8Array 100000 slice arrayBuffer | 116.22 us/op | 122.22 us/op | 0.95 |
Uint64 deserialize 100000 - iterate Uint8Array | 2.0173 ms/op | 1.7530 ms/op | 1.15 |
Uint64 deserialize 100000 - by Uint32A | 2.1028 ms/op | 1.8819 ms/op | 1.12 |
Uint64 deserialize 100000 - by DataView.getUint32 x2 | 1.9438 ms/op | 1.7765 ms/op | 1.09 |
Uint64 deserialize 100000 - by DataView.getBigUint64 | 4.9996 ms/op | 4.7748 ms/op | 1.05 |
Uint64 deserialize 100000 - by byte | 40.858 ms/op | 40.276 ms/op | 1.01 |
by benchmarkbot/action
nazarhussain
force-pushed
the
nh/vitest
branch
from
November 13, 2024 11:41
28a98e3
to
e26063d
Compare
twoeths
approved these changes
Nov 20, 2024
nazarhussain
added a commit
that referenced
this pull request
Dec 20, 2024
* 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
nazarhussain
added a commit
that referenced
this pull request
Jan 2, 2025
* chore: migrate from mocha to vitest (#422) * 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 * Fix download spec command
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Use consistent dependencies and frameworks across the repos.
Description
Steps to test or reproduce