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: migrate to the latest assemblyscript #348

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 1, 2024

Motivation

  • to prepare for simd version of digest64 later

Description

  • migrate to assemblyscript v0.27.24
  • clean up unnecessary files

part of #347
part of #357

Copy link

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: bf027ca Previous: 9889e7a Ratio
digestTwoHashObjects 50023 times 48.491 ms/op 47.829 ms/op 1.01
digest64 50023 times 50.070 ms/op 49.627 ms/op 1.01
digest 50023 times 53.915 ms/op 49.488 ms/op 1.09
input length 32 1.4140 us/op 1.2050 us/op 1.17
input length 64 1.5340 us/op 1.3050 us/op 1.18
input length 128 2.5040 us/op 2.2500 us/op 1.11
input length 256 3.5830 us/op 3.3340 us/op 1.07
input length 512 5.7790 us/op 5.5130 us/op 1.05
input length 1024 11.056 us/op 10.779 us/op 1.03
digest 1000000 times 869.41 ms/op 822.77 ms/op 1.06
hashObjectToByteArray 50023 times 1.4264 ms/op 1.4655 ms/op 0.97
byteArrayToHashObject 50023 times 3.4796 ms/op 1.6963 ms/op 2.05
getGindicesAtDepth 4.9140 us/op 3.9950 us/op 1.23
iterateAtDepth 10.052 us/op 8.4510 us/op 1.19
getGindexBits 534.00 ns/op 482.00 ns/op 1.11
gindexIterator 1.2070 us/op 1.0070 us/op 1.20
hash 2 Uint8Array 2250026 times - as-sha256 2.3364 s/op 2.2606 s/op 1.03
hashTwoObjects 2250026 times - as-sha256 2.2566 s/op 2.1471 s/op 1.05
hash 2 Uint8Array 2250026 times - noble 6.1165 s/op 5.0136 s/op 1.22
hashTwoObjects 2250026 times - noble 7.1108 s/op 7.1805 s/op 0.99
getNodeH() x7812.5 avg hindex 14.655 us/op 14.391 us/op 1.02
getNodeH() x7812.5 index 0 5.1100 us/op 5.1840 us/op 0.99
getNodeH() x7812.5 index 7 5.2070 us/op 5.1780 us/op 1.01
getNodeH() x7812.5 index 7 with key array 5.1700 us/op 5.2310 us/op 0.99
new LeafNode() x7812.5 112.73 us/op 119.15 us/op 0.95
multiproof - depth 15, 1 requested leaves 9.2030 us/op 9.3760 us/op 0.98
tree offset multiproof - depth 15, 1 requested leaves 20.563 us/op 20.526 us/op 1.00
compact multiproof - depth 15, 1 requested leaves 5.3940 us/op 5.6380 us/op 0.96
multiproof - depth 15, 2 requested leaves 12.935 us/op 13.402 us/op 0.97
tree offset multiproof - depth 15, 2 requested leaves 23.364 us/op 24.449 us/op 0.96
compact multiproof - depth 15, 2 requested leaves 3.3760 us/op 3.4550 us/op 0.98
multiproof - depth 15, 3 requested leaves 18.146 us/op 18.628 us/op 0.97
tree offset multiproof - depth 15, 3 requested leaves 30.600 us/op 30.807 us/op 0.99
compact multiproof - depth 15, 3 requested leaves 4.6610 us/op 4.8700 us/op 0.96
multiproof - depth 15, 4 requested leaves 23.583 us/op 24.675 us/op 0.96
tree offset multiproof - depth 15, 4 requested leaves 38.141 us/op 38.469 us/op 0.99
compact multiproof - depth 15, 4 requested leaves 5.4060 us/op 5.6240 us/op 0.96
packedRootsBytesToLeafNodes bytes 4000 offset 0 1.9970 us/op 2.0990 us/op 0.95
packedRootsBytesToLeafNodes bytes 4000 offset 1 2.0090 us/op 2.0950 us/op 0.96
packedRootsBytesToLeafNodes bytes 4000 offset 2 2.0070 us/op 2.1040 us/op 0.95
packedRootsBytesToLeafNodes bytes 4000 offset 3 1.9890 us/op 2.0710 us/op 0.96
subtreeFillToContents depth 40 count 250000 46.416 ms/op 40.754 ms/op 1.14
setRoot - gindexBitstring 9.0205 ms/op 9.0024 ms/op 1.00
setRoot - gindex 9.6918 ms/op 9.4327 ms/op 1.03
getRoot - gindexBitstring 2.6532 ms/op 2.7642 ms/op 0.96
getRoot - gindex 3.1613 ms/op 3.3459 ms/op 0.94
getHashObject then setHashObject 10.978 ms/op 10.787 ms/op 1.02
setNodeWithFn 9.4108 ms/op 9.5165 ms/op 0.99
getNodeAtDepth depth 0 x100000 1.1409 ms/op 1.1734 ms/op 0.97
setNodeAtDepth depth 0 x100000 2.6859 ms/op 2.7401 ms/op 0.98
getNodesAtDepth depth 0 x100000 1.0923 ms/op 1.0835 ms/op 1.01
setNodesAtDepth depth 0 x100000 1.4955 ms/op 1.4896 ms/op 1.00
getNodeAtDepth depth 1 x100000 1.2059 ms/op 1.2252 ms/op 0.98
setNodeAtDepth depth 1 x100000 6.0505 ms/op 5.8943 ms/op 1.03
getNodesAtDepth depth 1 x100000 1.2075 ms/op 1.2086 ms/op 1.00
setNodesAtDepth depth 1 x100000 4.8968 ms/op 4.9005 ms/op 1.00
getNodeAtDepth depth 2 x100000 1.5154 ms/op 1.4849 ms/op 1.02
setNodeAtDepth depth 2 x100000 10.162 ms/op 10.451 ms/op 0.97
getNodesAtDepth depth 2 x100000 19.748 ms/op 20.569 ms/op 0.96
setNodesAtDepth depth 2 x100000 16.006 ms/op 14.080 ms/op 1.14
tree.getNodesAtDepth - gindexes 7.4857 ms/op 7.1307 ms/op 1.05
tree.getNodesAtDepth - push all nodes 2.2626 ms/op 2.2751 ms/op 0.99
tree.getNodesAtDepth - navigation 155.72 us/op 155.22 us/op 1.00
tree.setNodesAtDepth - indexes 415.10 us/op 435.34 us/op 0.95
set at depth 8 572.00 ns/op 581.00 ns/op 0.98
set at depth 16 702.00 ns/op 755.00 ns/op 0.93
set at depth 32 1.1090 us/op 1.1530 us/op 0.96
iterateNodesAtDepth 8 256 14.496 us/op 15.550 us/op 0.93
getNodesAtDepth 8 256 3.5210 us/op 3.7350 us/op 0.94
iterateNodesAtDepth 16 65536 4.5361 ms/op 4.8778 ms/op 0.93
getNodesAtDepth 16 65536 1.9918 ms/op 2.0176 ms/op 0.99
iterateNodesAtDepth 32 250000 17.839 ms/op 17.197 ms/op 1.04
getNodesAtDepth 32 250000 4.2139 ms/op 4.9374 ms/op 0.85
iterateNodesAtDepth 40 250000 15.797 ms/op 17.527 ms/op 0.90
getNodesAtDepth 40 250000 4.2236 ms/op 4.8529 ms/op 0.87
250k validators 7.2730 s/op 8.1454 s/op 0.89
bitlist bytes to struct (120,90) 584.00 ns/op 775.00 ns/op 0.75
bitlist bytes to tree (120,90) 2.3210 us/op 2.5460 us/op 0.91
bitlist bytes to struct (2048,2048) 1.0040 us/op 1.0640 us/op 0.94
bitlist bytes to tree (2048,2048) 3.7080 us/op 3.4630 us/op 1.07
ByteListType - deserialize 8.1814 ms/op 7.7102 ms/op 1.06
BasicListType - deserialize 7.7143 ms/op 9.6419 ms/op 0.80
ByteListType - serialize 8.8426 ms/op 8.1066 ms/op 1.09
BasicListType - serialize 10.717 ms/op 10.077 ms/op 1.06
BasicListType - tree_convertToStruct 22.319 ms/op 23.864 ms/op 0.94
List[uint8, 68719476736] len 300000 ViewDU.getAll() + iterate 4.2524 ms/op 4.0716 ms/op 1.04
List[uint8, 68719476736] len 300000 ViewDU.get(i) 4.1368 ms/op 4.1478 ms/op 1.00
Array.push len 300000 empty Array - number 6.5739 ms/op 6.5121 ms/op 1.01
Array.set len 300000 from new Array - number 1.6872 ms/op 1.6225 ms/op 1.04
Array.set len 300000 - number 5.3419 ms/op 5.5827 ms/op 0.96
Uint8Array.set len 300000 218.16 us/op 221.31 us/op 0.99
Uint32Array.set len 300000 304.61 us/op 309.28 us/op 0.98
Container({a: uint8, b: uint8}) getViewDU x300000 20.587 ms/op 20.602 ms/op 1.00
ContainerNodeStruct({a: uint8, b: uint8}) getViewDU x300000 9.5414 ms/op 9.7776 ms/op 0.98
List(Container) len 300000 ViewDU.getAllReadonly() + iterate 204.59 ms/op 215.98 ms/op 0.95
List(Container) len 300000 ViewDU.getAllReadonlyValues() + iterate 281.85 ms/op 281.94 ms/op 1.00
List(Container) len 300000 ViewDU.get(i) 6.4741 ms/op 6.8352 ms/op 0.95
List(Container) len 300000 ViewDU.getReadonly(i) 6.4703 ms/op 6.6110 ms/op 0.98
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonly() + iterate 36.876 ms/op 39.097 ms/op 0.94
List(ContainerNodeStruct) len 300000 ViewDU.getAllReadonlyValues() + iterate 5.6905 ms/op 5.2599 ms/op 1.08
List(ContainerNodeStruct) len 300000 ViewDU.get(i) 6.3753 ms/op 6.3908 ms/op 1.00
List(ContainerNodeStruct) len 300000 ViewDU.getReadonly(i) 6.1833 ms/op 6.2255 ms/op 0.99
Array.push len 300000 empty Array - object 6.3750 ms/op 6.3839 ms/op 1.00
Array.set len 300000 from new Array - object 1.9857 ms/op 1.8477 ms/op 1.07
Array.set len 300000 - object 5.9323 ms/op 6.2232 ms/op 0.95
cachePermanentRootStruct no cache 9.6070 us/op 9.3110 us/op 1.03
cachePermanentRootStruct with cache 222.00 ns/op 232.00 ns/op 0.96
epochParticipation len 250000 rws 7813 2.3097 ms/op 2.2966 ms/op 1.01
deserialize Attestation - tree 3.1690 us/op 3.0710 us/op 1.03
deserialize Attestation - struct 2.1260 us/op 2.1040 us/op 1.01
deserialize SignedAggregateAndProof - tree 4.0150 us/op 3.7720 us/op 1.06
deserialize SignedAggregateAndProof - struct 3.1590 us/op 3.1550 us/op 1.00
deserialize SyncCommitteeMessage - tree 1.1830 us/op 1.1390 us/op 1.04
deserialize SyncCommitteeMessage - struct 1.2210 us/op 1.2710 us/op 0.96
deserialize SignedContributionAndProof - tree 2.1810 us/op 1.9960 us/op 1.09
deserialize SignedContributionAndProof - struct 2.6500 us/op 2.7240 us/op 0.97
deserialize SignedBeaconBlock - tree 233.97 us/op 217.70 us/op 1.07
deserialize SignedBeaconBlock - struct 129.28 us/op 138.71 us/op 0.93
BeaconState vc 300000 - deserialize tree 601.43 ms/op 632.60 ms/op 0.95
BeaconState vc 300000 - serialize tree 131.92 ms/op 140.99 ms/op 0.94
BeaconState.historicalRoots vc 300000 - deserialize tree 775.00 ns/op 849.00 ns/op 0.91
BeaconState.historicalRoots vc 300000 - serialize tree 826.00 ns/op 759.00 ns/op 1.09
BeaconState.validators vc 300000 - deserialize tree 550.48 ms/op 580.95 ms/op 0.95
BeaconState.validators vc 300000 - serialize tree 131.36 ms/op 111.68 ms/op 1.18
BeaconState.balances vc 300000 - deserialize tree 17.685 ms/op 21.044 ms/op 0.84
BeaconState.balances vc 300000 - serialize tree 3.3810 ms/op 5.0206 ms/op 0.67
BeaconState.previousEpochParticipation vc 300000 - deserialize tree 405.79 us/op 690.60 us/op 0.59
BeaconState.previousEpochParticipation vc 300000 - serialize tree 271.53 us/op 289.05 us/op 0.94
BeaconState.currentEpochParticipation vc 300000 - deserialize tree 403.53 us/op 645.76 us/op 0.62
BeaconState.currentEpochParticipation vc 300000 - serialize tree 265.04 us/op 287.05 us/op 0.92
BeaconState.inactivityScores vc 300000 - deserialize tree 21.796 ms/op 21.566 ms/op 1.01
BeaconState.inactivityScores vc 300000 - serialize tree 2.7440 ms/op 3.1295 ms/op 0.88
hashTreeRoot Attestation - struct 27.430 us/op 27.483 us/op 1.00
hashTreeRoot Attestation - tree 19.012 us/op 19.975 us/op 0.95
hashTreeRoot SignedAggregateAndProof - struct 38.861 us/op 40.084 us/op 0.97
hashTreeRoot SignedAggregateAndProof - tree 28.624 us/op 27.880 us/op 1.03
hashTreeRoot SyncCommitteeMessage - struct 9.3490 us/op 9.4160 us/op 0.99
hashTreeRoot SyncCommitteeMessage - tree 6.6580 us/op 6.2240 us/op 1.07
hashTreeRoot SignedContributionAndProof - struct 26.602 us/op 26.618 us/op 1.00
hashTreeRoot SignedContributionAndProof - tree 19.013 us/op 19.992 us/op 0.95
hashTreeRoot SignedBeaconBlock - struct 2.3209 ms/op 2.3989 ms/op 0.97
hashTreeRoot SignedBeaconBlock - tree 1.7005 ms/op 1.6676 ms/op 1.02
hashTreeRoot Validator - struct 12.690 us/op 13.528 us/op 0.94
hashTreeRoot Validator - tree 10.960 us/op 11.172 us/op 0.98
BeaconState vc 300000 - hashTreeRoot tree 3.7414 s/op 3.7048 s/op 1.01
BeaconState.historicalRoots vc 300000 - hashTreeRoot tree 1.4750 us/op 1.5430 us/op 0.96
BeaconState.validators vc 300000 - hashTreeRoot tree 3.5830 s/op 3.5777 s/op 1.00
BeaconState.balances vc 300000 - hashTreeRoot tree 85.623 ms/op 86.624 ms/op 0.99
BeaconState.previousEpochParticipation vc 300000 - hashTreeRoot tree 9.1599 ms/op 8.9611 ms/op 1.02
BeaconState.currentEpochParticipation vc 300000 - hashTreeRoot tree 9.1586 ms/op 8.9673 ms/op 1.02
BeaconState.inactivityScores vc 300000 - hashTreeRoot tree 90.316 ms/op 83.253 ms/op 1.08
hash64 x18 20.063 us/op 19.292 us/op 1.04
hashTwoObjects x18 18.066 us/op 17.828 us/op 1.01
hash64 x1740 1.9018 ms/op 1.8412 ms/op 1.03
hashTwoObjects x1740 1.7265 ms/op 1.6923 ms/op 1.02
hash64 x2700000 2.9217 s/op 2.8470 s/op 1.03
hashTwoObjects x2700000 2.6776 s/op 2.6347 s/op 1.02
get_exitEpoch - ContainerType 213.00 ns/op 212.00 ns/op 1.00
get_exitEpoch - ContainerNodeStructType 206.00 ns/op 215.00 ns/op 0.96
set_exitEpoch - ContainerType 238.00 ns/op 246.00 ns/op 0.97
set_exitEpoch - ContainerNodeStructType 213.00 ns/op 223.00 ns/op 0.96
get_pubkey - ContainerType 1.0870 us/op 1.2470 us/op 0.87
get_pubkey - ContainerNodeStructType 211.00 ns/op 223.00 ns/op 0.95
hashTreeRoot - ContainerType 377.00 ns/op 407.00 ns/op 0.93
hashTreeRoot - ContainerNodeStructType 437.00 ns/op 446.00 ns/op 0.98
createProof - ContainerType 3.9340 us/op 4.1370 us/op 0.95
createProof - ContainerNodeStructType 21.937 us/op 22.475 us/op 0.98
serialize - ContainerType 2.1750 us/op 1.9760 us/op 1.10
serialize - ContainerNodeStructType 1.6750 us/op 1.6380 us/op 1.02
set_exitEpoch_and_hashTreeRoot - ContainerType 4.2990 us/op 4.2060 us/op 1.02
set_exitEpoch_and_hashTreeRoot - ContainerNodeStructType 11.774 us/op 11.469 us/op 1.03
Array - for of 6.5000 us/op 4.9730 us/op 1.31
Array - for(;;) 5.7650 us/op 4.3750 us/op 1.32
basicListValue.readonlyValuesArray() 3.7610 ms/op 3.8558 ms/op 0.98
basicListValue.readonlyValuesArray() + loop all 3.8869 ms/op 4.0391 ms/op 0.96
compositeListValue.readonlyValuesArray() 28.961 ms/op 27.040 ms/op 1.07
compositeListValue.readonlyValuesArray() + loop all 23.032 ms/op 25.800 ms/op 0.89
Number64UintType - get balances list 4.5631 ms/op 5.1355 ms/op 0.89
Number64UintType - set balances list 9.9028 ms/op 9.1104 ms/op 1.09
Number64UintType - get and increase 10 then set 40.550 ms/op 42.951 ms/op 0.94
Number64UintType - increase 10 using applyDelta 15.608 ms/op 16.922 ms/op 0.92
Number64UintType - increase 10 using applyDeltaInBatch 15.329 ms/op 17.049 ms/op 0.90
tree_newTreeFromUint64Deltas 15.652 ms/op 15.853 ms/op 0.99
unsafeUint8ArrayToTree 30.037 ms/op 31.070 ms/op 0.97
bitLength(50) 225.00 ns/op 244.00 ns/op 0.92
bitLengthStr(50) 233.00 ns/op 286.00 ns/op 0.81
bitLength(8000) 222.00 ns/op 238.00 ns/op 0.93
bitLengthStr(8000) 282.00 ns/op 322.00 ns/op 0.88
bitLength(250000) 220.00 ns/op 238.00 ns/op 0.92
bitLengthStr(250000) 309.00 ns/op 358.00 ns/op 0.86
floor - Math.floor (53) 0.46588 ns/op 0.46418 ns/op 1.00
floor - << 0 (53) 0.46419 ns/op 0.46716 ns/op 0.99
floor - Math.floor (512) 0.46379 ns/op 0.46447 ns/op 1.00
floor - << 0 (512) 0.46708 ns/op 0.46474 ns/op 1.01
fnIf(0) 1.5455 ns/op 1.5507 ns/op 1.00
fnSwitch(0) 2.4767 ns/op 2.4772 ns/op 1.00
fnObj(0) 0.46497 ns/op 0.46505 ns/op 1.00
fnArr(0) 0.47097 ns/op 0.46469 ns/op 1.01
fnIf(4) 2.1645 ns/op 2.1645 ns/op 1.00
fnSwitch(4) 2.5247 ns/op 2.4776 ns/op 1.02
fnObj(4) 0.46420 ns/op 0.46529 ns/op 1.00
fnArr(4) 0.46398 ns/op 0.46483 ns/op 1.00
fnIf(9) 3.0925 ns/op 3.0941 ns/op 1.00
fnSwitch(9) 2.4734 ns/op 2.4770 ns/op 1.00
fnObj(9) 0.47238 ns/op 0.46417 ns/op 1.02
fnArr(9) 0.46396 ns/op 0.46416 ns/op 1.00
Container {a,b,vec} - as struct x100000 46.590 us/op 46.614 us/op 1.00
Container {a,b,vec} - as tree x100000 371.74 us/op 372.53 us/op 1.00
Container {a,vec,b} - as struct x100000 77.812 us/op 77.730 us/op 1.00
Container {a,vec,b} - as tree x100000 402.20 us/op 422.83 us/op 0.95
get 2 props x1000000 - rawObject 309.53 us/op 309.87 us/op 1.00
get 2 props x1000000 - proxy 71.213 ms/op 72.149 ms/op 0.99
get 2 props x1000000 - customObj 309.45 us/op 309.98 us/op 1.00
Simple object binary -> struct 652.00 ns/op 697.00 ns/op 0.94
Simple object binary -> tree_backed 1.7440 us/op 1.8820 us/op 0.93
Simple object struct -> tree_backed 2.4210 us/op 2.4350 us/op 0.99
Simple object tree_backed -> struct 2.0200 us/op 2.0880 us/op 0.97
Simple object struct -> binary 979.00 ns/op 1.1160 us/op 0.88
Simple object tree_backed -> binary 1.7390 us/op 1.7150 us/op 1.01
aggregationBits binary -> struct 566.00 ns/op 654.00 ns/op 0.87
aggregationBits binary -> tree_backed 2.2840 us/op 2.5060 us/op 0.91
aggregationBits struct -> tree_backed 2.7190 us/op 3.0100 us/op 0.90
aggregationBits tree_backed -> struct 1.0960 us/op 1.3240 us/op 0.83
aggregationBits struct -> binary 773.00 ns/op 903.00 ns/op 0.86
aggregationBits tree_backed -> binary 995.00 ns/op 1.1370 us/op 0.88
List(uint8) 100000 binary -> struct 1.3847 ms/op 1.4092 ms/op 0.98
List(uint8) 100000 binary -> tree_backed 90.956 us/op 97.001 us/op 0.94
List(uint8) 100000 struct -> tree_backed 1.4299 ms/op 1.5457 ms/op 0.93
List(uint8) 100000 tree_backed -> struct 967.62 us/op 1.0164 ms/op 0.95
List(uint8) 100000 struct -> binary 1.2474 ms/op 1.4124 ms/op 0.88
List(uint8) 100000 tree_backed -> binary 82.171 us/op 83.860 us/op 0.98
List(uint64Number) 100000 binary -> struct 1.2750 ms/op 1.3271 ms/op 0.96
List(uint64Number) 100000 binary -> tree_backed 2.9137 ms/op 3.3256 ms/op 0.88
List(uint64Number) 100000 struct -> tree_backed 4.6343 ms/op 4.8802 ms/op 0.95
List(uint64Number) 100000 tree_backed -> struct 2.0775 ms/op 2.1082 ms/op 0.99
List(uint64Number) 100000 struct -> binary 1.4357 ms/op 1.5629 ms/op 0.92
List(uint64Number) 100000 tree_backed -> binary 784.77 us/op 820.30 us/op 0.96
List(Uint64Bigint) 100000 binary -> struct 3.4662 ms/op 3.4657 ms/op 1.00
List(Uint64Bigint) 100000 binary -> tree_backed 3.1451 ms/op 3.4353 ms/op 0.92
List(Uint64Bigint) 100000 struct -> tree_backed 5.4681 ms/op 5.6443 ms/op 0.97
List(Uint64Bigint) 100000 tree_backed -> struct 4.3256 ms/op 4.6275 ms/op 0.93
List(Uint64Bigint) 100000 struct -> binary 2.1168 ms/op 2.0788 ms/op 1.02
List(Uint64Bigint) 100000 tree_backed -> binary 856.10 us/op 944.26 us/op 0.91
Vector(Root) 100000 binary -> struct 29.667 ms/op 31.141 ms/op 0.95
Vector(Root) 100000 binary -> tree_backed 31.929 ms/op 29.630 ms/op 1.08
Vector(Root) 100000 struct -> tree_backed 36.023 ms/op 35.747 ms/op 1.01
Vector(Root) 100000 tree_backed -> struct 43.347 ms/op 44.463 ms/op 0.97
Vector(Root) 100000 struct -> binary 1.8934 ms/op 1.9161 ms/op 0.99
Vector(Root) 100000 tree_backed -> binary 8.3656 ms/op 9.3525 ms/op 0.89
List(Validator) 100000 binary -> struct 107.46 ms/op 109.16 ms/op 0.98
List(Validator) 100000 binary -> tree_backed 288.05 ms/op 294.24 ms/op 0.98
List(Validator) 100000 struct -> tree_backed 306.83 ms/op 305.26 ms/op 1.01
List(Validator) 100000 tree_backed -> struct 190.12 ms/op 204.01 ms/op 0.93
List(Validator) 100000 struct -> binary 30.986 ms/op 30.447 ms/op 1.02
List(Validator) 100000 tree_backed -> binary 94.454 ms/op 104.86 ms/op 0.90
List(Validator-NS) 100000 binary -> struct 103.40 ms/op 97.800 ms/op 1.06
List(Validator-NS) 100000 binary -> tree_backed 149.30 ms/op 161.07 ms/op 0.93
List(Validator-NS) 100000 struct -> tree_backed 187.67 ms/op 190.18 ms/op 0.99
List(Validator-NS) 100000 tree_backed -> struct 151.00 ms/op 154.63 ms/op 0.98
List(Validator-NS) 100000 struct -> binary 30.687 ms/op 31.150 ms/op 0.99
List(Validator-NS) 100000 tree_backed -> binary 35.679 ms/op 38.428 ms/op 0.93
get epochStatuses - MutableVector 88.315 us/op 87.839 us/op 1.01
get epochStatuses - ViewDU 195.53 us/op 205.49 us/op 0.95
set epochStatuses - ListTreeView 1.4155 ms/op 1.4591 ms/op 0.97
set epochStatuses - ListTreeView - set() 430.36 us/op 429.92 us/op 1.00
set epochStatuses - ListTreeView - commit() 412.80 us/op 416.26 us/op 0.99
bitstring 641.07 ns/op 640.56 ns/op 1.00
bit mask 14.155 ns/op 14.180 ns/op 1.00
struct - increase slot to 1000000 933.46 us/op 927.93 us/op 1.01
UintNumberType - increase slot to 1000000 28.810 ms/op 28.519 ms/op 1.01
UintBigintType - increase slot to 1000000 403.04 ms/op 409.38 ms/op 0.98
UintBigint8 x 100000 tree_deserialize 5.1811 ms/op 5.0096 ms/op 1.03
UintBigint8 x 100000 tree_serialize 1.2655 ms/op 1.1847 ms/op 1.07
UintBigint16 x 100000 tree_deserialize 5.1351 ms/op 5.0737 ms/op 1.01
UintBigint16 x 100000 tree_serialize 1.1584 ms/op 1.1656 ms/op 0.99
UintBigint32 x 100000 tree_deserialize 4.8868 ms/op 5.2931 ms/op 0.92
UintBigint32 x 100000 tree_serialize 1.2111 ms/op 1.2360 ms/op 0.98
UintBigint64 x 100000 tree_deserialize 5.6912 ms/op 6.0842 ms/op 0.94
UintBigint64 x 100000 tree_serialize 1.5744 ms/op 1.6076 ms/op 0.98
UintBigint8 x 100000 value_deserialize 433.11 us/op 432.99 us/op 1.00
UintBigint8 x 100000 value_serialize 584.41 us/op 599.48 us/op 0.97
UintBigint16 x 100000 value_deserialize 463.70 us/op 463.90 us/op 1.00
UintBigint16 x 100000 value_serialize 622.81 us/op 639.28 us/op 0.97
UintBigint32 x 100000 value_deserialize 437.14 us/op 433.35 us/op 1.01
UintBigint32 x 100000 value_serialize 619.81 us/op 640.57 us/op 0.97
UintBigint64 x 100000 value_deserialize 465.66 us/op 465.25 us/op 1.00
UintBigint64 x 100000 value_serialize 798.33 us/op 818.23 us/op 0.98
UintBigint8 x 100000 deserialize 4.6304 ms/op 4.6576 ms/op 0.99
UintBigint8 x 100000 serialize 1.4196 ms/op 1.4542 ms/op 0.98
UintBigint16 x 100000 deserialize 4.6314 ms/op 4.8646 ms/op 0.95
UintBigint16 x 100000 serialize 1.4861 ms/op 1.5027 ms/op 0.99
UintBigint32 x 100000 deserialize 5.4776 ms/op 5.5093 ms/op 0.99
UintBigint32 x 100000 serialize 2.8185 ms/op 2.8183 ms/op 1.00
UintBigint64 x 100000 deserialize 3.5256 ms/op 3.8631 ms/op 0.91
UintBigint64 x 100000 serialize 1.4938 ms/op 1.5109 ms/op 0.99
UintBigint128 x 100000 deserialize 5.8579 ms/op 6.0471 ms/op 0.97
UintBigint128 x 100000 serialize 21.771 ms/op 17.277 ms/op 1.26
UintBigint256 x 100000 deserialize 10.802 ms/op 10.668 ms/op 1.01
UintBigint256 x 100000 serialize 63.273 ms/op 52.017 ms/op 1.22
Slice from Uint8Array x25000 995.61 us/op 993.38 us/op 1.00
Slice from ArrayBuffer x25000 17.528 ms/op 17.924 ms/op 0.98
Slice from ArrayBuffer x25000 + new Uint8Array 19.245 ms/op 19.357 ms/op 0.99
Copy Uint8Array 100000 iterate 810.45 us/op 811.47 us/op 1.00
Copy Uint8Array 100000 slice 86.339 us/op 91.379 us/op 0.94
Copy Uint8Array 100000 Uint8Array.prototype.slice.call 86.737 us/op 91.273 us/op 0.95
Copy Buffer 100000 Uint8Array.prototype.slice.call 86.549 us/op 90.885 us/op 0.95
Copy Uint8Array 100000 slice + set 151.69 us/op 162.01 us/op 0.94
Copy Uint8Array 100000 subarray + set 86.496 us/op 90.933 us/op 0.95
Copy Uint8Array 100000 slice arrayBuffer 86.978 us/op 92.685 us/op 0.94
Uint64 deserialize 100000 - iterate Uint8Array 1.7563 ms/op 1.8099 ms/op 0.97
Uint64 deserialize 100000 - by Uint32A 1.7222 ms/op 1.7982 ms/op 0.96
Uint64 deserialize 100000 - by DataView.getUint32 x2 1.6988 ms/op 1.7167 ms/op 0.99
Uint64 deserialize 100000 - by DataView.getBigUint64 4.8053 ms/op 4.8185 ms/op 1.00
Uint64 deserialize 100000 - by byte 65.215 ms/op 65.271 ms/op 1.00

by benchmarkbot/action

@twoeths twoeths marked this pull request as ready for review March 25, 2024 04:02
@twoeths twoeths requested a review from a team as a code owner March 25, 2024 04:02
@twoeths twoeths merged commit 9cf6991 into master Mar 25, 2024
9 checks passed
@twoeths twoeths deleted the tuyen/migrate_assemblyscript branch March 25, 2024 04:03
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.

2 participants