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: remove support for CJS #440

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

chore: remove support for CJS #440

wants to merge 1 commit into from

Conversation

nazarhussain
Copy link
Contributor

Motivation

Remove support for the CJS build

Description

Closes #439

Steps to test or reproduce

  • Run all tests

Copy link

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 4bf5205 Previous: 2fd9c04 Ratio
set_exitEpoch - ContainerType 247.00 ns/op 743.00 ns/op 0.33
set_exitEpoch - ContainerNodeStructType 234.00 ns/op 867.00 ns/op 0.27
Full benchmark results
Benchmark suite Current: 4bf5205 Previous: 2fd9c04 Ratio
digestTwoHashObjects 50023 times 48.275 ms/op 48.385 ms/op 1.00
digest2Bytes32 50023 times 55.045 ms/op 54.739 ms/op 1.01
digest 50023 times 55.479 ms/op 55.134 ms/op 1.01
input length 32 1.2110 us/op 1.2220 us/op 0.99
input length 64 1.3600 us/op 1.3350 us/op 1.02
input length 128 2.3050 us/op 2.2710 us/op 1.01
input length 256 3.4040 us/op 3.3710 us/op 1.01
input length 512 5.6330 us/op 5.5760 us/op 1.01
input length 1024 10.862 us/op 10.768 us/op 1.01
digest 1000000 times 905.35 ms/op 884.65 ms/op 1.02
hashObjectToByteArray 50023 times 1.2301 ms/op 1.2315 ms/op 1.00
byteArrayToHashObject 50023 times 1.7951 ms/op 1.8030 ms/op 1.00
digest64 200092 times 217.34 ms/op 213.67 ms/op 1.02
hash 200092 times using batchHash4UintArray64s 238.91 ms/op 240.28 ms/op 0.99
digest64HashObjects 200092 times 194.63 ms/op 194.67 ms/op 1.00
hash 200092 times using batchHash4HashObjectInputs 210.01 ms/op 207.74 ms/op 1.01
getGindicesAtDepth 4.1740 us/op 4.1450 us/op 1.01
iterateAtDepth 7.5860 us/op 7.4670 us/op 1.02
getGindexBits 460.00 ns/op 454.00 ns/op 1.01
gindexIterator 1.0490 us/op 1.0330 us/op 1.02
HashComputationLevel.push then loop 27.324 ms/op 27.802 ms/op 0.98
HashComputation[] push then loop 36.806 ms/op 49.368 ms/op 0.75
hash 2 Uint8Array 500000 times - hashtree 216.19 ms/op 216.43 ms/op 1.00
hashTwoObjects 500000 times - hashtree 211.20 ms/op 214.97 ms/op 0.98
executeHashComputations - hashtree 9.8769 ms/op 9.8174 ms/op 1.01
hash 2 Uint8Array 500000 times - as-sha256 564.01 ms/op 566.39 ms/op 1.00
hashTwoObjects 500000 times - as-sha256 510.57 ms/op 512.46 ms/op 1.00
executeHashComputations - as-sha256 47.759 ms/op 49.092 ms/op 0.97
hash 2 Uint8Array 500000 times - noble 1.2249 s/op 1.2320 s/op 0.99
hashTwoObjects 500000 times - noble 1.6260 s/op 1.6458 s/op 0.99
executeHashComputations - noble 36.343 ms/op 40.524 ms/op 0.90
getHashComputations 2.5696 ms/op 3.2876 ms/op 0.78
executeHashComputations 11.064 ms/op 11.015 ms/op 1.00
get root 17.108 ms/op 17.228 ms/op 0.99
getNodeH() x7812.5 avg hindex 12.198 us/op 12.973 us/op 0.94
getNodeH() x7812.5 index 0 7.4710 us/op 7.4830 us/op 1.00
getNodeH() x7812.5 index 7 7.4520 us/op 7.4880 us/op 1.00
getNodeH() x7812.5 index 7 with key array 6.2640 us/op 6.2660 us/op 1.00
new LeafNode() x7812.5 284.81 us/op 288.84 us/op 0.99
getHashComputations 250000 nodes 16.967 ms/op 17.077 ms/op 0.99
batchHash 250000 nodes 98.846 ms/op 83.672 ms/op 1.18
get root 250000 nodes 125.81 ms/op 118.39 ms/op 1.06
getHashComputations 500000 nodes 35.428 ms/op 32.790 ms/op 1.08
batchHash 500000 nodes 168.58 ms/op 170.81 ms/op 0.99
get root 500000 nodes 235.57 ms/op 237.45 ms/op 0.99
getHashComputations 1000000 nodes 67.458 ms/op 68.401 ms/op 0.99
batchHash 1000000 nodes 312.62 ms/op 314.97 ms/op 0.99
get root 1000000 nodes 470.41 ms/op 474.60 ms/op 0.99
multiproof - depth 15, 1 requested leaves 8.0970 us/op 8.0360 us/op 1.01
tree offset multiproof - depth 15, 1 requested leaves 17.595 us/op 17.505 us/op 1.01
compact multiproof - depth 15, 1 requested leaves 3.1710 us/op 2.9850 us/op 1.06
multiproof - depth 15, 2 requested leaves 11.325 us/op 11.659 us/op 0.97
tree offset multiproof - depth 15, 2 requested leaves 21.458 us/op 21.064 us/op 1.02
compact multiproof - depth 15, 2 requested leaves 3.1080 us/op 3.0240 us/op 1.03
multiproof - depth 15, 3 requested leaves 16.224 us/op 16.464 us/op 0.99
tree offset multiproof - depth 15, 3 requested leaves 27.550 us/op 27.416 us/op 1.00
compact multiproof - depth 15, 3 requested leaves 3.6520 us/op 3.6760 us/op 0.99
multiproof - depth 15, 4 requested leaves 20.959 us/op 21.480 us/op 0.98
tree offset multiproof - depth 15, 4 requested leaves 33.709 us/op 33.923 us/op 0.99
compact multiproof - depth 15, 4 requested leaves 4.3860 us/op 4.2500 us/op 1.03
packedRootsBytesToLeafNodes bytes 4000 offset 0 5.7270 us/op 5.5760 us/op 1.03
packedRootsBytesToLeafNodes bytes 4000 offset 1 5.7260 us/op 5.5020 us/op 1.04
packedRootsBytesToLeafNodes bytes 4000 offset 2 5.6510 us/op 5.5960 us/op 1.01
packedRootsBytesToLeafNodes bytes 4000 offset 3 5.7970 us/op 5.5090 us/op 1.05
subtreeFillToContents depth 40 count 250000 49.661 ms/op 49.667 ms/op 1.00
setRoot - gindexBitstring 22.407 ms/op 20.717 ms/op 1.08
setRoot - gindex 23.687 ms/op 21.769 ms/op 1.09
getRoot - gindexBitstring 2.5004 ms/op 2.6428 ms/op 0.95
getRoot - gindex 3.1439 ms/op 3.4452 ms/op 0.91
getHashObject then setHashObject 23.955 ms/op 22.668 ms/op 1.06
setNodeWithFn 19.342 ms/op 19.949 ms/op 0.97
getNodeAtDepth depth 0 x100000 280.08 us/op 284.47 us/op 0.98
setNodeAtDepth depth 0 x100000 2.5434 ms/op 2.5826 ms/op 0.98
getNodesAtDepth depth 0 x100000 312.34 us/op 312.60 us/op 1.00
setNodesAtDepth depth 0 x100000 762.08 us/op 770.25 us/op 0.99
getNodeAtDepth depth 1 x100000 341.97 us/op 345.54 us/op 0.99
setNodeAtDepth depth 1 x100000 8.0442 ms/op 8.3900 ms/op 0.96
getNodesAtDepth depth 1 x100000 442.16 us/op 436.17 us/op 1.01
setNodesAtDepth depth 1 x100000 6.6087 ms/op 8.0911 ms/op 0.82
getNodeAtDepth depth 2 x100000 761.41 us/op 742.41 us/op 1.03
setNodeAtDepth depth 2 x100000 14.832 ms/op 15.448 ms/op 0.96
getNodesAtDepth depth 2 x100000 17.455 ms/op 19.301 ms/op 0.90
setNodesAtDepth depth 2 x100000 23.598 ms/op 22.443 ms/op 1.05
tree.getNodesAtDepth - gindexes 8.6974 ms/op 9.0838 ms/op 0.96
tree.getNodesAtDepth - push all nodes 2.1819 ms/op 2.2499 ms/op 0.97
tree.getNodesAtDepth - navigation 311.38 us/op 312.00 us/op 1.00
tree.setNodesAtDepth - indexes 660.99 us/op 702.50 us/op 0.94
set at depth 8 758.00 ns/op 673.00 ns/op 1.13
set at depth 16 1.1080 us/op 1.2090 us/op 0.92
set at depth 32 1.9210 us/op 1.9830 us/op 0.97
iterateNodesAtDepth 8 256 13.701 us/op 14.029 us/op 0.98
getNodesAtDepth 8 256 3.6260 us/op 3.9860 us/op 0.91
iterateNodesAtDepth 16 65536 4.3868 ms/op 4.9523 ms/op 0.89
getNodesAtDepth 16 65536 1.9638 ms/op 2.1318 ms/op 0.92
iterateNodesAtDepth 32 250000 15.921 ms/op 17.971 ms/op 0.89
getNodesAtDepth 32 250000 4.9790 ms/op 5.0235 ms/op 0.99
iterateNodesAtDepth 40 250000 16.700 ms/op 16.973 ms/op 0.98
getNodesAtDepth 40 250000 4.8604 ms/op 5.2017 ms/op 0.93
250000 validators root getter 118.82 ms/op 119.60 ms/op 0.99
250000 validators batchHash() 87.191 ms/op 96.226 ms/op 0.91
250000 validators hashComputations 17.018 ms/op 13.681 ms/op 1.24
bitlist bytes to struct (120,90) 930.00 ns/op 1.0320 us/op 0.90
bitlist bytes to tree (120,90) 3.5440 us/op 2.9040 us/op 1.22
bitlist bytes to struct (2048,2048) 1.3560 us/op 1.1460 us/op 1.18
bitlist bytes to tree (2048,2048) 4.4400 us/op 4.6090 us/op 0.96
ByteListType - deserialize 7.8673 ms/op 8.2940 ms/op 0.95
BasicListType - deserialize 17.078 ms/op 17.814 ms/op 0.96
ByteListType - serialize 7.8485 ms/op 8.2229 ms/op 0.95
BasicListType - serialize 10.315 ms/op 10.528 ms/op 0.98
BasicListType - tree_convertToStruct 30.160 ms/op 30.733 ms/op 0.98
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 4.9492 ms/op 5.0479 ms/op 0.98
List[uint8, 68719476736] len 300000 ViewDU.get(i) 4.3925 ms/op 4.4003 ms/op 1.00
Array.push len 300000 empty Array - number 6.6628 ms/op 7.7576 ms/op 0.86
Array.set len 300000 from new Array - number 2.1703 ms/op 2.3929 ms/op 0.91
Array.set len 300000 - number 6.2207 ms/op 6.8603 ms/op 0.91
Uint8Array.set len 300000 483.75 us/op 490.48 us/op 0.99
Uint32Array.set len 300000 548.90 us/op 554.60 us/op 0.99
Container({a: uint8, b: uint8}) getViewDU x300000 25.894 ms/op 25.535 ms/op 1.01
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 10.412 ms/op 10.557 ms/op 0.99
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 204.57 ms/op 222.67 ms/op 0.92
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 218.80 ms/op 288.04 ms/op 0.76
List(Container) len 300000 ViewDU.get(i) 6.6061 ms/op 8.4440 ms/op 0.78
List(Container) len 300000 ViewDU.getReadonly(i) 6.3510 ms/op 7.2905 ms/op 0.87
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 39.387 ms/op 34.764 ms/op 1.13
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 4.8070 ms/op 6.9714 ms/op 0.69
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 5.9610 ms/op 6.7554 ms/op 0.88
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 5.8015 ms/op 6.6821 ms/op 0.87
Array.push len 300000 empty Array - object 6.4692 ms/op 8.2629 ms/op 0.78
Array.set len 300000 from new Array - object 2.0378 ms/op 2.0682 ms/op 0.99
Array.set len 300000 - object 6.2516 ms/op 6.8760 ms/op 0.91
cachePermanentRootStruct no cache 5.3230 us/op 5.9280 us/op 0.90
cachePermanentRootStruct with cache 222.00 ns/op 245.00 ns/op 0.91
epochParticipation len 250000 rws 7813 2.4557 ms/op 2.3026 ms/op 1.07
BeaconState ViewDU hashTreeRoot() vc=200000 109.55 ms/op 119.71 ms/op 0.92
BeaconState ViewDU recursive hash - commit step vc=200000 4.3436 ms/op 5.0692 ms/op 0.86
BeaconState ViewDU validator tree creation vc=10000 38.416 ms/op 42.276 ms/op 0.91
BeaconState ViewDU batchHashTreeRoot vc=200000 100.59 ms/op 109.21 ms/op 0.92
BeaconState ViewDU hashTreeRoot - commit step vc=200000 88.935 ms/op 96.290 ms/op 0.92
BeaconState ViewDU hashTreeRoot - hash step vc=200000 17.224 ms/op 18.397 ms/op 0.94
deserialize Attestation - tree 3.5060 us/op 3.9770 us/op 0.88
deserialize Attestation - struct 1.7910 us/op 2.1880 us/op 0.82
deserialize SignedAggregateAndProof - tree 4.6370 us/op 5.3310 us/op 0.87
deserialize SignedAggregateAndProof - struct 2.8800 us/op 3.4600 us/op 0.83
deserialize SyncCommitteeMessage - tree 1.3340 us/op 1.5160 us/op 0.88
deserialize SyncCommitteeMessage - struct 1.0530 us/op 1.2600 us/op 0.84
deserialize SignedContributionAndProof - tree 2.7930 us/op 3.3480 us/op 0.83
deserialize SignedContributionAndProof - struct 2.3050 us/op 2.7630 us/op 0.83
deserialize SignedBeaconBlock - tree 274.10 us/op 320.10 us/op 0.86
deserialize SignedBeaconBlock - struct 115.56 us/op 146.11 us/op 0.79
BeaconState vc 300000 - deserialize tree 666.41 ms/op 676.70 ms/op 0.98
BeaconState vc 300000 - serialize tree 154.45 ms/op 176.66 ms/op 0.87
BeaconState.historicalRoots vc 300000 - deserialize tree 835.00 ns/op 963.00 ns/op 0.87
BeaconState.historicalRoots vc 300000 - serialize tree 681.00 ns/op 797.00 ns/op 0.85
BeaconState.validators vc 300000 - deserialize tree 615.60 ms/op 645.65 ms/op 0.95
BeaconState.validators vc 300000 - serialize tree 118.93 ms/op 108.09 ms/op 1.10
BeaconState.balances vc 300000 - deserialize tree 27.329 ms/op 31.118 ms/op 0.88
BeaconState.balances vc 300000 - serialize tree 4.2230 ms/op 5.4166 ms/op 0.78
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 969.00 us/op 1.1177 ms/op 0.87
BeaconState.previousEpochParticipation vc 300000 - serialize tree 353.63 us/op 329.73 us/op 1.07
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 1.0094 ms/op 1.1398 ms/op 0.89
BeaconState.currentEpochParticipation vc 300000 - serialize tree 345.32 us/op 329.92 us/op 1.05
BeaconState.inactivityScores vc 300000 - deserialize tree 28.137 ms/op 28.841 ms/op 0.98
BeaconState.inactivityScores vc 300000 - serialize tree 4.3280 ms/op 6.4320 ms/op 0.67
hashTreeRoot Attestation - struct 22.248 us/op 22.568 us/op 0.99
hashTreeRoot Attestation - tree 8.8810 us/op 9.7040 us/op 0.92
hashTreeRoot SignedAggregateAndProof - struct 26.000 us/op 34.438 us/op 0.75
hashTreeRoot SignedAggregateAndProof - tree 13.312 us/op 14.744 us/op 0.90
hashTreeRoot SyncCommitteeMessage - struct 6.6930 us/op 9.1540 us/op 0.73
hashTreeRoot SyncCommitteeMessage - tree 3.6030 us/op 3.6090 us/op 1.00
hashTreeRoot SignedContributionAndProof - struct 18.401 us/op 24.373 us/op 0.75
hashTreeRoot SignedContributionAndProof - tree 9.2980 us/op 10.036 us/op 0.93
hashTreeRoot SignedBeaconBlock - struct 1.2818 ms/op 1.7085 ms/op 0.75
hashTreeRoot SignedBeaconBlock - tree 786.93 us/op 874.80 us/op 0.90
hashTreeRoot Validator - struct 7.7500 us/op 10.415 us/op 0.74
hashTreeRoot Validator - tree 7.0590 us/op 8.8040 us/op 0.80
BeaconState vc 300000 - hashTreeRoot tree 2.2563 s/op 2.5106 s/op 0.90
BeaconState vc 300000 - batchHashTreeRoot tree 4.0982 s/op 4.5668 s/op 0.90
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 1.0170 us/op 1.1800 us/op 0.86
BeaconState.validators vc 300000 - hashTreeRoot tree 2.3979 s/op 2.6840 s/op 0.89
BeaconState.balances vc 300000 - hashTreeRoot tree 34.331 ms/op 37.232 ms/op 0.92
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 4.2247 ms/op 4.6431 ms/op 0.91
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 4.2202 ms/op 4.5680 ms/op 0.92
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 35.609 ms/op 39.894 ms/op 0.89
hash64 x18 8.6000 us/op 9.8100 us/op 0.88
hashTwoObjects x18 8.2150 us/op 8.9900 us/op 0.91
hash64 x1740 776.87 us/op 889.16 us/op 0.87
hashTwoObjects x1740 751.28 us/op 817.95 us/op 0.92
hash64 x2700000 1.2182 s/op 1.3707 s/op 0.89
hashTwoObjects x2700000 1.1673 s/op 1.2561 s/op 0.93
get_exitEpoch - ContainerType 232.00 ns/op 470.00 ns/op 0.49
get_exitEpoch - ContainerNodeStructType 226.00 ns/op 531.00 ns/op 0.43
set_exitEpoch - ContainerType 247.00 ns/op 743.00 ns/op 0.33
set_exitEpoch - ContainerNodeStructType 234.00 ns/op 867.00 ns/op 0.27
get_pubkey - ContainerType 948.00 ns/op 2.1440 us/op 0.44
get_pubkey - ContainerNodeStructType 221.00 ns/op 628.00 ns/op 0.35
hashTreeRoot - ContainerType 404.00 ns/op 911.00 ns/op 0.44
hashTreeRoot - ContainerNodeStructType 390.00 ns/op 822.00 ns/op 0.47
createProof - ContainerType 3.8860 us/op 7.2270 us/op 0.54
createProof - ContainerNodeStructType 20.798 us/op 38.455 us/op 0.54
serialize - ContainerType 1.6890 us/op 3.0960 us/op 0.55
serialize - ContainerNodeStructType 1.3780 us/op 2.3860 us/op 0.58
set_exitEpoch_and_hashTreeRoot - ContainerType 2.9280 us/op 5.1660 us/op 0.57
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 7.4710 us/op 11.845 us/op 0.63
Array - for of 5.5530 us/op 6.0820 us/op 0.91
Array - for(;;) 5.5730 us/op 6.0990 us/op 0.91
basicListValue.readonlyValuesArray() 4.9914 ms/op 8.5034 ms/op 0.59
basicListValue.readonlyValuesArray() + loop all 4.8588 ms/op 9.2078 ms/op 0.53
compositeListValue.readonlyValuesArray() 30.568 ms/op 31.312 ms/op 0.98
compositeListValue.readonlyValuesArray() + loop all 29.344 ms/op 32.164 ms/op 0.91
Number64UintType - get balances list 4.3563 ms/op 4.9334 ms/op 0.88
Number64UintType - set balances list 9.9938 ms/op 10.233 ms/op 0.98
Number64UintType - get and increase 10 then set 41.100 ms/op 45.730 ms/op 0.90
Number64UintType - increase 10 using applyDelta 16.370 ms/op 19.214 ms/op 0.85
Number64UintType - increase 10 using applyDeltaInBatch 16.766 ms/op 18.532 ms/op 0.90
tree_newTreeFromUint64Deltas 22.090 ms/op 23.803 ms/op 0.93
unsafeUint8ArrayToTree 34.826 ms/op 43.554 ms/op 0.80
bitLength(50) 240.00 ns/op 283.00 ns/op 0.85
bitLengthStr(50) 228.00 ns/op 260.00 ns/op 0.88
bitLength(8000) 225.00 ns/op 280.00 ns/op 0.80
bitLengthStr(8000) 269.00 ns/op 301.00 ns/op 0.89
bitLength(250000) 229.00 ns/op 276.00 ns/op 0.83
bitLengthStr(250000) 305.00 ns/op 340.00 ns/op 0.90
floor - Math.floor (53) 1.2444 ns/op 1.2463 ns/op 1.00
floor - << 0 (53) 1.2478 ns/op 1.2449 ns/op 1.00
floor - Math.floor (512) 1.2485 ns/op 1.2485 ns/op 1.00
floor - << 0 (512) 1.2442 ns/op 1.2445 ns/op 1.00
fnIf(0) 1.5538 ns/op 1.5550 ns/op 1.00
fnSwitch(0) 2.1831 ns/op 2.2084 ns/op 0.99
fnObj(0) 1.5589 ns/op 1.5592 ns/op 1.00
fnArr(0) 1.5547 ns/op 1.5564 ns/op 1.00
fnIf(4) 2.1853 ns/op 2.2012 ns/op 0.99
fnSwitch(4) 2.1757 ns/op 2.1851 ns/op 1.00
fnObj(4) 1.5645 ns/op 1.5553 ns/op 1.01
fnArr(4) 1.5555 ns/op 1.5566 ns/op 1.00
fnIf(9) 3.1071 ns/op 3.1105 ns/op 1.00
fnSwitch(9) 2.1764 ns/op 2.1789 ns/op 1.00
fnObj(9) 1.5545 ns/op 1.5566 ns/op 1.00
fnArr(9) 1.5569 ns/op 1.5585 ns/op 1.00
Container {a,b,vec} - as struct x100000 124.51 us/op 124.70 us/op 1.00
Container {a,b,vec} - as tree x100000 560.19 us/op 528.88 us/op 1.06
Container {a,vec,b} - as struct x100000 155.79 us/op 156.29 us/op 1.00
Container {a,vec,b} - as tree x100000 560.17 us/op 497.88 us/op 1.13
get 2 props x1000000 - rawObject 315.65 us/op 311.55 us/op 1.01
get 2 props x1000000 - proxy 73.097 ms/op 73.231 ms/op 1.00
get 2 props x1000000 - customObj 310.92 us/op 311.63 us/op 1.00
Simple object binary -> struct 709.00 ns/op 666.00 ns/op 1.06
Simple object binary -> tree_backed 1.9480 us/op 1.8000 us/op 1.08
Simple object struct -> tree_backed 2.6340 us/op 2.5550 us/op 1.03
Simple object tree_backed -> struct 1.9080 us/op 1.8870 us/op 1.01
Simple object struct -> binary 977.00 ns/op 1.1100 us/op 0.88
Simple object tree_backed -> binary 1.6430 us/op 1.5810 us/op 1.04
aggregationBits binary -> struct 652.00 ns/op 556.00 ns/op 1.17
aggregationBits binary -> tree_backed 2.6320 us/op 2.3520 us/op 1.12
aggregationBits struct -> tree_backed 3.0650 us/op 2.8250 us/op 1.08
aggregationBits tree_backed -> struct 1.2420 us/op 1.1760 us/op 1.06
aggregationBits struct -> binary 831.00 ns/op 895.00 ns/op 0.93
aggregationBits tree_backed -> binary 1.0650 us/op 1.0710 us/op 0.99
List(uint8) 100000 binary -> struct 1.4818 ms/op 1.7193 ms/op 0.86
List(uint8) 100000 binary -> tree_backed 268.96 us/op 378.88 us/op 0.71
List(uint8) 100000 struct -> tree_backed 1.4057 ms/op 1.4716 ms/op 0.96
List(uint8) 100000 tree_backed -> struct 1.0441 ms/op 1.1255 ms/op 0.93
List(uint8) 100000 struct -> binary 1.1008 ms/op 1.1255 ms/op 0.98
List(uint8) 100000 tree_backed -> binary 113.41 us/op 133.70 us/op 0.85
List(uint64Number) 100000 binary -> struct 1.3083 ms/op 1.4898 ms/op 0.88
List(uint64Number) 100000 binary -> tree_backed 4.5592 ms/op 5.0622 ms/op 0.90
List(uint64Number) 100000 struct -> tree_backed 6.6790 ms/op 7.2356 ms/op 0.92
List(uint64Number) 100000 tree_backed -> struct 2.5107 ms/op 2.9213 ms/op 0.86
List(uint64Number) 100000 struct -> binary 1.5854 ms/op 1.8754 ms/op 0.85
List(uint64Number) 100000 tree_backed -> binary 1.0600 ms/op 1.9946 ms/op 0.53
List(Uint64Bigint) 100000 binary -> struct 3.7004 ms/op 4.3077 ms/op 0.86
List(Uint64Bigint) 100000 binary -> tree_backed 4.6128 ms/op 5.2529 ms/op 0.88
List(Uint64Bigint) 100000 struct -> tree_backed 7.4986 ms/op 8.0646 ms/op 0.93
List(Uint64Bigint) 100000 tree_backed -> struct 4.9910 ms/op 5.6323 ms/op 0.89
List(Uint64Bigint) 100000 struct -> binary 2.0632 ms/op 2.0885 ms/op 0.99
List(Uint64Bigint) 100000 tree_backed -> binary 1.0852 ms/op 1.8135 ms/op 0.60
Vector(Root) 100000 binary -> struct 34.701 ms/op 41.100 ms/op 0.84
Vector(Root) 100000 binary -> tree_backed 39.712 ms/op 44.078 ms/op 0.90
Vector(Root) 100000 struct -> tree_backed 50.102 ms/op 55.892 ms/op 0.90
Vector(Root) 100000 tree_backed -> struct 50.105 ms/op 56.983 ms/op 0.88
Vector(Root) 100000 struct -> binary 3.3598 ms/op 2.7534 ms/op 1.22
Vector(Root) 100000 tree_backed -> binary 7.3288 ms/op 8.0801 ms/op 0.91
List(Validator) 100000 binary -> struct 119.08 ms/op 113.34 ms/op 1.05
List(Validator) 100000 binary -> tree_backed 353.98 ms/op 390.64 ms/op 0.91
List(Validator) 100000 struct -> tree_backed 370.40 ms/op 417.76 ms/op 0.89
List(Validator) 100000 tree_backed -> struct 206.42 ms/op 226.69 ms/op 0.91
List(Validator) 100000 struct -> binary 28.878 ms/op 29.274 ms/op 0.99
List(Validator) 100000 tree_backed -> binary 105.50 ms/op 108.34 ms/op 0.97
List(Validator-NS) 100000 binary -> struct 130.11 ms/op 135.28 ms/op 0.96
List(Validator-NS) 100000 binary -> tree_backed 162.19 ms/op 184.51 ms/op 0.88
List(Validator-NS) 100000 struct -> tree_backed 224.47 ms/op 235.91 ms/op 0.95
List(Validator-NS) 100000 tree_backed -> struct 186.67 ms/op 192.62 ms/op 0.97
List(Validator-NS) 100000 struct -> binary 28.992 ms/op 29.747 ms/op 0.97
List(Validator-NS) 100000 tree_backed -> binary 34.616 ms/op 35.712 ms/op 0.97
get epochStatuses - MutableVector 92.197 us/op 101.62 us/op 0.91
get epochStatuses - ViewDU 208.21 us/op 203.65 us/op 1.02
set epochStatuses - ListTreeView 2.0950 ms/op 2.2079 ms/op 0.95
set epochStatuses - ListTreeView - set() 469.25 us/op 431.41 us/op 1.09
set epochStatuses - ListTreeView - commit() 774.95 us/op 804.31 us/op 0.96
bitstring 513.89 ns/op 520.44 ns/op 0.99
bit mask 13.473 ns/op 13.407 ns/op 1.00
struct - increase slot to 1000000 938.46 us/op 936.53 us/op 1.00
UintNumberType - increase slot to 1000000 27.759 ms/op 26.798 ms/op 1.04
UintBigintType - increase slot to 1000000 169.35 ms/op 214.36 ms/op 0.79
UintBigint8 x 100000 tree_deserialize 4.8658 ms/op 5.8918 ms/op 0.83
UintBigint8 x 100000 tree_serialize 1.1473 ms/op 1.1095 ms/op 1.03
UintBigint16 x 100000 tree_deserialize 4.9124 ms/op 6.7823 ms/op 0.72
UintBigint16 x 100000 tree_serialize 1.3666 ms/op 1.7868 ms/op 0.76
UintBigint32 x 100000 tree_deserialize 5.5482 ms/op 7.0351 ms/op 0.79
UintBigint32 x 100000 tree_serialize 1.6905 ms/op 2.3450 ms/op 0.72
UintBigint64 x 100000 tree_deserialize 6.2549 ms/op 8.0089 ms/op 0.78
UintBigint64 x 100000 tree_serialize 1.7503 ms/op 3.3089 ms/op 0.53
UintBigint8 x 100000 value_deserialize 437.03 us/op 436.55 us/op 1.00
UintBigint8 x 100000 value_serialize 767.45 us/op 944.72 us/op 0.81
UintBigint16 x 100000 value_deserialize 466.48 us/op 466.98 us/op 1.00
UintBigint16 x 100000 value_serialize 811.95 us/op 949.22 us/op 0.86
UintBigint32 x 100000 value_deserialize 498.00 us/op 497.75 us/op 1.00
UintBigint32 x 100000 value_serialize 859.65 us/op 1.0340 ms/op 0.83
UintBigint64 x 100000 value_deserialize 562.26 us/op 561.86 us/op 1.00
UintBigint64 x 100000 value_serialize 1.0452 ms/op 1.4075 ms/op 0.74
UintBigint8 x 100000 deserialize 3.0880 ms/op 4.0786 ms/op 0.76
UintBigint8 x 100000 serialize 1.6273 ms/op 1.6495 ms/op 0.99
UintBigint16 x 100000 deserialize 3.2461 ms/op 4.2306 ms/op 0.77
UintBigint16 x 100000 serialize 1.6564 ms/op 1.5280 ms/op 1.08
UintBigint32 x 100000 deserialize 3.1703 ms/op 4.1933 ms/op 0.76
UintBigint32 x 100000 serialize 2.8640 ms/op 3.1683 ms/op 0.90
UintBigint64 x 100000 deserialize 4.3336 ms/op 4.8024 ms/op 0.90
UintBigint64 x 100000 serialize 1.6503 ms/op 1.6952 ms/op 0.97
UintBigint128 x 100000 deserialize 5.6464 ms/op 6.8769 ms/op 0.82
UintBigint128 x 100000 serialize 14.492 ms/op 15.576 ms/op 0.93
UintBigint256 x 100000 deserialize 8.4950 ms/op 9.2019 ms/op 0.92
UintBigint256 x 100000 serialize 43.260 ms/op 45.317 ms/op 0.95
Slice from Uint8Array x25000 1.4495 ms/op 1.3730 ms/op 1.06
Slice from ArrayBuffer x25000 15.869 ms/op 16.661 ms/op 0.95
Slice from ArrayBuffer x25000 + new Uint8Array 14.499 ms/op 18.610 ms/op 0.78
Copy Uint8Array 100000 iterate 2.7711 ms/op 2.6541 ms/op 1.04
Copy Uint8Array 100000 slice 85.319 us/op 120.03 us/op 0.71
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 85.117 us/op 119.67 us/op 0.71
Copy Buffer 100000 Uint8Array.prototype.slice.call 85.533 us/op 124.86 us/op 0.69
Copy Uint8Array 100000 slice + set 168.43 us/op 251.50 us/op 0.67
Copy Uint8Array 100000 subarray + set 85.420 us/op 122.68 us/op 0.70
Copy Uint8Array 100000 slice arrayBuffer 85.382 us/op 124.22 us/op 0.69
Uint64 deserialize 100000 - iterate Uint8Array 1.8223 ms/op 2.2252 ms/op 0.82
Uint64 deserialize 100000 - by Uint32A 1.7764 ms/op 2.1293 ms/op 0.83
Uint64 deserialize 100000 - by DataView.getUint32 x2 1.7886 ms/op 2.1917 ms/op 0.82
Uint64 deserialize 100000 - by DataView.getBigUint64 4.7948 ms/op 5.4629 ms/op 0.88
Uint64 deserialize 100000 - by byte 40.644 ms/op 41.007 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.

Stop supporting CommonJS builds
2 participants