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

refactor: move WithBytes to types package #7201

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 28, 2024

Moves WithBytes to types packages to be consistent with new type added in #7185 and allow reuse.

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.21%. Comparing base (d8b599a) to head (89fb070).
Report is 3 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7201   +/-   ##
=========================================
  Coverage     49.21%   49.21%           
=========================================
  Files           598      598           
  Lines         39796    39796           
  Branches       2097     2096    -1     
=========================================
  Hits          19587    19587           
  Misses        20169    20169           
  Partials         40       40           

Copy link
Contributor

github-actions bot commented Oct 28, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 3a4591a Previous: d8b599a Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7612 ms/op 1.8249 ms/op 0.97
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 47.425 us/op 41.941 us/op 1.13
BLS verify - blst 927.82 us/op 907.32 us/op 1.02
BLS verifyMultipleSignatures 3 - blst 1.3826 ms/op 1.3364 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst 2.1455 ms/op 2.2827 ms/op 0.94
BLS verifyMultipleSignatures 32 - blst 4.5066 ms/op 4.4597 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 8.6713 ms/op 8.2968 ms/op 1.05
BLS verifyMultipleSignatures 128 - blst 16.068 ms/op 15.886 ms/op 1.01
BLS deserializing 10000 signatures 638.45 ms/op 597.49 ms/op 1.07
BLS deserializing 100000 signatures 6.3546 s/op 6.2766 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 1.0038 ms/op 949.54 us/op 1.06
BLS verifyMultipleSignatures - same message - 8 - blst 1.1090 ms/op 1.0752 ms/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst 1.7898 ms/op 1.6807 ms/op 1.06
BLS verifyMultipleSignatures - same message - 64 - blst 2.5907 ms/op 2.5514 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.2270 ms/op 4.1658 ms/op 1.01
BLS aggregatePubkeys 32 - blst 18.168 us/op 18.009 us/op 1.01
BLS aggregatePubkeys 128 - blst 64.317 us/op 63.754 us/op 1.01
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 54.534 ms/op 62.382 ms/op 0.87
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 57.360 ms/op 50.373 ms/op 1.14
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 51.518 ms/op 35.147 ms/op 1.47
getSlashingsAndExits - default max 71.117 us/op 64.492 us/op 1.10
getSlashingsAndExits - 2k 282.74 us/op 293.69 us/op 0.96
proposeBlockBody type=full, size=empty 5.4058 ms/op 4.8232 ms/op 1.12
isKnown best case - 1 super set check 513.00 ns/op 530.00 ns/op 0.97
isKnown normal case - 2 super set checks 772.00 ns/op 506.00 ns/op 1.53
isKnown worse case - 16 super set checks 719.00 ns/op 499.00 ns/op 1.44
InMemoryCheckpointStateCache - add get delete 3.5400 us/op 3.3110 us/op 1.07
updateUnfinalizedPubkeys - updating 10 pubkeys 1.3313 ms/op 983.27 us/op 1.35
updateUnfinalizedPubkeys - updating 100 pubkeys 3.7025 ms/op 2.7390 ms/op 1.35
updateUnfinalizedPubkeys - updating 1000 pubkeys 48.244 ms/op 38.608 ms/op 1.25
validate api signedAggregateAndProof - struct 1.6485 ms/op 1.5032 ms/op 1.10
validate gossip signedAggregateAndProof - struct 1.5715 ms/op 1.9341 ms/op 0.81
batch validate gossip attestation - vc 640000 - chunk 32 134.07 us/op 119.36 us/op 1.12
batch validate gossip attestation - vc 640000 - chunk 64 121.38 us/op 103.49 us/op 1.17
batch validate gossip attestation - vc 640000 - chunk 128 105.42 us/op 96.328 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 109.35 us/op 94.069 us/op 1.16
pickEth1Vote - no votes 876.33 us/op 880.17 us/op 1.00
pickEth1Vote - max votes 5.2995 ms/op 6.8694 ms/op 0.77
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.560 ms/op 14.787 ms/op 0.71
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 14.256 ms/op 14.369 ms/op 0.99
pickEth1Vote - Eth1Data fastSerialize value x2048 404.66 us/op 399.58 us/op 1.01
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.8586 ms/op 4.6087 ms/op 1.05
bytes32 toHexString 873.00 ns/op 779.00 ns/op 1.12
bytes32 Buffer.toString(hex) 473.00 ns/op 463.00 ns/op 1.02
bytes32 Buffer.toString(hex) from Uint8Array 657.00 ns/op 672.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 492.00 ns/op 474.00 ns/op 1.04
Object access 1 prop 0.37300 ns/op 0.34300 ns/op 1.09
Map access 1 prop 0.33900 ns/op 0.34600 ns/op 0.98
Object get x1000 5.4000 ns/op 5.6660 ns/op 0.95
Map get x1000 6.2210 ns/op 6.1190 ns/op 1.02
Object set x1000 24.615 ns/op 23.380 ns/op 1.05
Map set x1000 20.481 ns/op 19.907 ns/op 1.03
Return object 10000 times 0.31460 ns/op 0.30760 ns/op 1.02
Throw Error 10000 times 2.9583 us/op 2.7927 us/op 1.06
toHex 126.18 ns/op 119.78 ns/op 1.05
Buffer.from 115.68 ns/op 110.02 ns/op 1.05
shared Buffer 82.629 ns/op 72.699 ns/op 1.14
fastMsgIdFn sha256 / 200 bytes 2.2230 us/op 2.1390 us/op 1.04
fastMsgIdFn h32 xxhash / 200 bytes 493.00 ns/op 462.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 200 bytes 493.00 ns/op 469.00 ns/op 1.05
fastMsgIdFn sha256 / 1000 bytes 6.1510 us/op 6.2180 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 614.00 ns/op 576.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 1000 bytes 576.00 ns/op 539.00 ns/op 1.07
fastMsgIdFn sha256 / 10000 bytes 49.190 us/op 50.229 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 2.0070 us/op 1.9940 us/op 1.01
fastMsgIdFn h64 xxhash / 10000 bytes 1.3780 us/op 1.3470 us/op 1.02
send data - 1000 256B messages 12.602 ms/op 14.261 ms/op 0.88
send data - 1000 512B messages 17.300 ms/op 16.523 ms/op 1.05
send data - 1000 1024B messages 23.548 ms/op 25.158 ms/op 0.94
send data - 1000 1200B messages 28.774 ms/op 21.332 ms/op 1.35
send data - 1000 2048B messages 32.290 ms/op 30.490 ms/op 1.06
send data - 1000 4096B messages 30.175 ms/op 24.362 ms/op 1.24
send data - 1000 16384B messages 67.204 ms/op 62.293 ms/op 1.08
send data - 1000 65536B messages 278.13 ms/op 241.34 ms/op 1.15
enrSubnets - fastDeserialize 64 bits 1.6280 us/op 1.2060 us/op 1.35
enrSubnets - ssz BitVector 64 bits 660.00 ns/op 527.00 ns/op 1.25
enrSubnets - fastDeserialize 4 bits 396.00 ns/op 351.00 ns/op 1.13
enrSubnets - ssz BitVector 4 bits 655.00 ns/op 527.00 ns/op 1.24
prioritizePeers score -10:0 att 32-0.1 sync 2-0 204.08 us/op 131.28 us/op 1.55
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 177.27 us/op 137.07 us/op 1.29
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 345.27 us/op 253.24 us/op 1.36
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 478.91 us/op 422.00 us/op 1.13
prioritizePeers score 0:0 att 64-1 sync 4-1 1.1485 ms/op 473.85 us/op 2.42
array of 16000 items push then shift 1.4912 us/op 1.3058 us/op 1.14
LinkedList of 16000 items push then shift 10.960 ns/op 6.5890 ns/op 1.66
array of 16000 items push then pop 122.72 ns/op 78.851 ns/op 1.56
LinkedList of 16000 items push then pop 6.9600 ns/op 6.4360 ns/op 1.08
array of 24000 items push then shift 2.0142 us/op 1.9078 us/op 1.06
LinkedList of 24000 items push then shift 8.1850 ns/op 6.4710 ns/op 1.26
array of 24000 items push then pop 167.23 ns/op 113.32 ns/op 1.48
LinkedList of 24000 items push then pop 10.056 ns/op 6.3460 ns/op 1.58
intersect bitArray bitLen 8 5.6350 ns/op 5.5180 ns/op 1.02
intersect array and set length 8 72.288 ns/op 40.756 ns/op 1.77
intersect bitArray bitLen 128 28.141 ns/op 26.841 ns/op 1.05
intersect array and set length 128 817.58 ns/op 595.86 ns/op 1.37
bitArray.getTrueBitIndexes() bitLen 128 2.6710 us/op 1.7800 us/op 1.50
bitArray.getTrueBitIndexes() bitLen 248 4.5220 us/op 2.3330 us/op 1.94
bitArray.getTrueBitIndexes() bitLen 512 10.776 us/op 5.4790 us/op 1.97
Buffer.concat 32 items 1.3870 us/op 1.0610 us/op 1.31
Uint8Array.set 32 items 2.4930 us/op 1.3780 us/op 1.81
Buffer.copy 2.6750 us/op 1.4840 us/op 1.80
Uint8Array.set - with subarray 4.1220 us/op 2.0200 us/op 2.04
Uint8Array.set - without subarray 2.2080 us/op 1.2870 us/op 1.72
getUint32 - dataview 568.00 ns/op 422.00 ns/op 1.35
getUint32 - manual 535.00 ns/op 355.00 ns/op 1.51
Set add up to 64 items then delete first 2.3052 us/op 1.8818 us/op 1.22
OrderedSet add up to 64 items then delete first 3.2250 us/op 2.8988 us/op 1.11
Set add up to 64 items then delete last 2.5232 us/op 2.1124 us/op 1.19
OrderedSet add up to 64 items then delete last 3.6798 us/op 3.2058 us/op 1.15
Set add up to 64 items then delete middle 2.7082 us/op 2.1279 us/op 1.27
OrderedSet add up to 64 items then delete middle 5.7213 us/op 4.6198 us/op 1.24
Set add up to 128 items then delete first 4.8454 us/op 4.1580 us/op 1.17
OrderedSet add up to 128 items then delete first 7.7579 us/op 6.5426 us/op 1.19
Set add up to 128 items then delete last 4.5122 us/op 4.0424 us/op 1.12
OrderedSet add up to 128 items then delete last 6.6003 us/op 6.1728 us/op 1.07
Set add up to 128 items then delete middle 5.1913 us/op 4.0799 us/op 1.27
OrderedSet add up to 128 items then delete middle 15.046 us/op 12.524 us/op 1.20
Set add up to 256 items then delete first 9.3614 us/op 8.2401 us/op 1.14
OrderedSet add up to 256 items then delete first 15.650 us/op 12.998 us/op 1.20
Set add up to 256 items then delete last 9.0435 us/op 7.9680 us/op 1.13
OrderedSet add up to 256 items then delete last 12.916 us/op 12.262 us/op 1.05
Set add up to 256 items then delete middle 8.3944 us/op 7.9300 us/op 1.06
OrderedSet add up to 256 items then delete middle 38.096 us/op 35.191 us/op 1.08
transfer serialized Status (84 B) 1.5540 us/op 1.3440 us/op 1.16
copy serialized Status (84 B) 1.3950 us/op 1.1430 us/op 1.22
transfer serialized SignedVoluntaryExit (112 B) 1.5650 us/op 1.3970 us/op 1.12
copy serialized SignedVoluntaryExit (112 B) 1.5620 us/op 1.2070 us/op 1.29
transfer serialized ProposerSlashing (416 B) 1.8950 us/op 1.5390 us/op 1.23
copy serialized ProposerSlashing (416 B) 2.0430 us/op 1.6510 us/op 1.24
transfer serialized Attestation (485 B) 1.6370 us/op 1.5510 us/op 1.06
copy serialized Attestation (485 B) 1.9180 us/op 1.3560 us/op 1.41
transfer serialized AttesterSlashing (33232 B) 1.9240 us/op 1.7150 us/op 1.12
copy serialized AttesterSlashing (33232 B) 4.4100 us/op 3.6870 us/op 1.20
transfer serialized Small SignedBeaconBlock (128000 B) 2.1890 us/op 2.0810 us/op 1.05
copy serialized Small SignedBeaconBlock (128000 B) 10.894 us/op 10.397 us/op 1.05
transfer serialized Avg SignedBeaconBlock (200000 B) 2.3360 us/op 3.2140 us/op 0.73
copy serialized Avg SignedBeaconBlock (200000 B) 14.591 us/op 14.845 us/op 0.98
transfer serialized BlobsSidecar (524380 B) 2.9130 us/op 2.9880 us/op 0.97
copy serialized BlobsSidecar (524380 B) 139.70 us/op 75.204 us/op 1.86
transfer serialized Big SignedBeaconBlock (1000000 B) 2.7890 us/op 3.1750 us/op 0.88
copy serialized Big SignedBeaconBlock (1000000 B) 148.59 us/op 214.35 us/op 0.69
pass gossip attestations to forkchoice per slot 2.5363 ms/op 2.4405 ms/op 1.04
forkChoice updateHead vc 100000 bc 64 eq 0 432.99 us/op 353.19 us/op 1.23
forkChoice updateHead vc 600000 bc 64 eq 0 2.4874 ms/op 2.6585 ms/op 0.94
forkChoice updateHead vc 1000000 bc 64 eq 0 5.5067 ms/op 4.0659 ms/op 1.35
forkChoice updateHead vc 600000 bc 320 eq 0 2.3783 ms/op 2.4492 ms/op 0.97
forkChoice updateHead vc 600000 bc 1200 eq 0 2.5227 ms/op 2.2476 ms/op 1.12
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9258 ms/op 3.1637 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 1000 9.8165 ms/op 9.4682 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 10000 9.6411 ms/op 9.0856 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 300000 14.983 ms/op 11.977 ms/op 1.25
computeDeltas 500000 validators 300 proto nodes 3.3915 ms/op 4.4504 ms/op 0.76
computeDeltas 500000 validators 1200 proto nodes 3.4272 ms/op 3.5019 ms/op 0.98
computeDeltas 500000 validators 7200 proto nodes 3.3144 ms/op 3.4821 ms/op 0.95
computeDeltas 750000 validators 300 proto nodes 5.0604 ms/op 5.1301 ms/op 0.99
computeDeltas 750000 validators 1200 proto nodes 4.9642 ms/op 5.4964 ms/op 0.90
computeDeltas 750000 validators 7200 proto nodes 4.9032 ms/op 5.1577 ms/op 0.95
computeDeltas 1400000 validators 300 proto nodes 9.1883 ms/op 9.0155 ms/op 1.02
computeDeltas 1400000 validators 1200 proto nodes 8.9622 ms/op 9.2870 ms/op 0.97
computeDeltas 1400000 validators 7200 proto nodes 9.1891 ms/op 8.7609 ms/op 1.05
computeDeltas 2100000 validators 300 proto nodes 13.537 ms/op 13.738 ms/op 0.99
computeDeltas 2100000 validators 1200 proto nodes 13.703 ms/op 14.314 ms/op 0.96
computeDeltas 2100000 validators 7200 proto nodes 13.505 ms/op 14.899 ms/op 0.91
altair processAttestation - 250000 vs - 7PWei normalcase 1.4373 ms/op 2.2338 ms/op 0.64
altair processAttestation - 250000 vs - 7PWei worstcase 2.4917 ms/op 2.3962 ms/op 1.04
altair processAttestation - setStatus - 1/6 committees join 75.095 us/op 77.423 us/op 0.97
altair processAttestation - setStatus - 1/3 committees join 139.79 us/op 156.02 us/op 0.90
altair processAttestation - setStatus - 1/2 committees join 225.02 us/op 201.32 us/op 1.12
altair processAttestation - setStatus - 2/3 committees join 310.13 us/op 293.26 us/op 1.06
altair processAttestation - setStatus - 4/5 committees join 464.89 us/op 432.04 us/op 1.08
altair processAttestation - setStatus - 100% committees join 527.04 us/op 547.13 us/op 0.96
altair processBlock - 250000 vs - 7PWei normalcase 4.1350 ms/op 4.1207 ms/op 1.00
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.201 ms/op 27.402 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase 34.648 ms/op 36.801 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 53.385 ms/op 68.552 ms/op 0.78
phase0 processBlock - 250000 vs - 7PWei normalcase 1.4145 ms/op 2.3741 ms/op 0.60
phase0 processBlock - 250000 vs - 7PWei worstcase 23.050 ms/op 26.975 ms/op 0.85
altair processEth1Data - 250000 vs - 7PWei normalcase 266.78 us/op 494.87 us/op 0.54
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.9340 us/op 8.0850 us/op 0.61
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 35.183 us/op 33.856 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.1300 us/op 10.435 us/op 0.87
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.1050 us/op 6.6440 us/op 0.92
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 119.11 us/op 116.30 us/op 1.02
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 842.75 us/op 897.26 us/op 0.94
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1699 ms/op 1.2778 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1539 ms/op 1.2250 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0358 ms/op 2.9760 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1640 ms/op 1.2296 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.1084 ms/op 3.0461 ms/op 1.02
Tree 40 250000 create 228.90 ms/op 179.50 ms/op 1.28
Tree 40 250000 get(125000) 109.02 ns/op 119.36 ns/op 0.91
Tree 40 250000 set(125000) 587.41 ns/op 565.42 ns/op 1.04
Tree 40 250000 toArray() 18.939 ms/op 15.486 ms/op 1.22
Tree 40 250000 iterate all - toArray() + loop 10.228 ms/op 21.759 ms/op 0.47
Tree 40 250000 iterate all - get(i) 45.463 ms/op 54.045 ms/op 0.84
Array 250000 create 2.3651 ms/op 2.8988 ms/op 0.82
Array 250000 clone - spread 1.1435 ms/op 1.3913 ms/op 0.82
Array 250000 get(125000) 0.59800 ns/op 0.67400 ns/op 0.89
Array 250000 set(125000) 0.60200 ns/op 0.62900 ns/op 0.96
Array 250000 iterate all - loop 78.335 us/op 80.776 us/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.070 ms/op 45.552 ms/op 0.92
Array.fill - length 1000000 2.4637 ms/op 2.6572 ms/op 0.93
Array push - length 1000000 16.300 ms/op 19.962 ms/op 0.82
Array.get 0.27450 ns/op 0.27044 ns/op 1.01
Uint8Array.get 0.34904 ns/op 0.35883 ns/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.631 ms/op 21.492 ms/op 0.77
altair processEpoch - mainnet_e81889 221.24 ms/op 321.03 ms/op 0.69
mainnet_e81889 - altair beforeProcessEpoch 17.251 ms/op 22.098 ms/op 0.78
mainnet_e81889 - altair processJustificationAndFinalization 6.2100 us/op 16.098 us/op 0.39
mainnet_e81889 - altair processInactivityUpdates 4.0335 ms/op 7.4955 ms/op 0.54
mainnet_e81889 - altair processRewardsAndPenalties 51.686 ms/op 42.504 ms/op 1.22
mainnet_e81889 - altair processRegistryUpdates 2.2550 us/op 3.5410 us/op 0.64
mainnet_e81889 - altair processSlashings 763.00 ns/op 825.00 ns/op 0.92
mainnet_e81889 - altair processEth1DataReset 687.00 ns/op 885.00 ns/op 0.78
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0782 ms/op 1.2410 ms/op 0.87
mainnet_e81889 - altair processSlashingsReset 3.1080 us/op 2.5280 us/op 1.23
mainnet_e81889 - altair processRandaoMixesReset 3.0000 us/op 3.6310 us/op 0.83
mainnet_e81889 - altair processHistoricalRootsUpdate 736.00 ns/op 953.00 ns/op 0.77
mainnet_e81889 - altair processParticipationFlagUpdates 2.9270 us/op 3.5490 us/op 0.82
mainnet_e81889 - altair processSyncCommitteeUpdates 991.00 ns/op 756.00 ns/op 1.31
mainnet_e81889 - altair afterProcessEpoch 44.747 ms/op 43.339 ms/op 1.03
capella processEpoch - mainnet_e217614 838.72 ms/op 1.0908 s/op 0.77
mainnet_e217614 - capella beforeProcessEpoch 63.286 ms/op 71.705 ms/op 0.88
mainnet_e217614 - capella processJustificationAndFinalization 14.770 us/op 13.462 us/op 1.10
mainnet_e217614 - capella processInactivityUpdates 15.130 ms/op 15.803 ms/op 0.96
mainnet_e217614 - capella processRewardsAndPenalties 250.81 ms/op 233.26 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 12.635 us/op 12.302 us/op 1.03
mainnet_e217614 - capella processSlashings 917.00 ns/op 965.00 ns/op 0.95
mainnet_e217614 - capella processEth1DataReset 840.00 ns/op 784.00 ns/op 1.07
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.708 ms/op 5.2233 ms/op 3.01
mainnet_e217614 - capella processSlashingsReset 3.0730 us/op 3.8600 us/op 0.80
mainnet_e217614 - capella processRandaoMixesReset 8.2270 us/op 6.5910 us/op 1.25
mainnet_e217614 - capella processHistoricalRootsUpdate 849.00 ns/op 965.00 ns/op 0.88
mainnet_e217614 - capella processParticipationFlagUpdates 1.9100 us/op 4.6360 us/op 0.41
mainnet_e217614 - capella afterProcessEpoch 104.00 ms/op 111.33 ms/op 0.93
phase0 processEpoch - mainnet_e58758 298.27 ms/op 424.23 ms/op 0.70
mainnet_e58758 - phase0 beforeProcessEpoch 78.637 ms/op 101.70 ms/op 0.77
mainnet_e58758 - phase0 processJustificationAndFinalization 18.280 us/op 25.678 us/op 0.71
mainnet_e58758 - phase0 processRewardsAndPenalties 26.083 ms/op 35.252 ms/op 0.74
mainnet_e58758 - phase0 processRegistryUpdates 7.2890 us/op 13.804 us/op 0.53
mainnet_e58758 - phase0 processSlashings 829.00 ns/op 1.2900 us/op 0.64
mainnet_e58758 - phase0 processEth1DataReset 692.00 ns/op 921.00 ns/op 0.75
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3563 ms/op 865.17 us/op 1.57
mainnet_e58758 - phase0 processSlashingsReset 3.3850 us/op 4.9010 us/op 0.69
mainnet_e58758 - phase0 processRandaoMixesReset 3.6400 us/op 9.0500 us/op 0.40
mainnet_e58758 - phase0 processHistoricalRootsUpdate 812.00 ns/op 1.8610 us/op 0.44
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.4210 us/op 8.5510 us/op 0.40
mainnet_e58758 - phase0 afterProcessEpoch 35.177 ms/op 41.596 ms/op 0.85
phase0 processEffectiveBalanceUpdates - 250000 normalcase 985.06 us/op 1.4351 ms/op 0.69
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5414 ms/op 2.2290 ms/op 0.69
altair processInactivityUpdates - 250000 normalcase 16.910 ms/op 23.225 ms/op 0.73
altair processInactivityUpdates - 250000 worstcase 16.481 ms/op 21.480 ms/op 0.77
phase0 processRegistryUpdates - 250000 normalcase 8.2970 us/op 11.951 us/op 0.69
phase0 processRegistryUpdates - 250000 badcase_full_deposits 313.95 us/op 315.55 us/op 0.99
phase0 processRegistryUpdates - 250000 worstcase 0.5 123.15 ms/op 167.05 ms/op 0.74
altair processRewardsAndPenalties - 250000 normalcase 46.570 ms/op 42.919 ms/op 1.09
altair processRewardsAndPenalties - 250000 worstcase 39.561 ms/op 54.402 ms/op 0.73
phase0 getAttestationDeltas - 250000 normalcase 7.0165 ms/op 12.621 ms/op 0.56
phase0 getAttestationDeltas - 250000 worstcase 6.3746 ms/op 8.5105 ms/op 0.75
phase0 processSlashings - 250000 worstcase 93.320 us/op 98.996 us/op 0.94
altair processSyncCommitteeUpdates - 250000 110.89 ms/op 119.28 ms/op 0.93
BeaconState.hashTreeRoot - No change 555.00 ns/op 608.00 ns/op 0.91
BeaconState.hashTreeRoot - 1 full validator 102.20 us/op 121.24 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 1.2684 ms/op 1.0226 ms/op 1.24
BeaconState.hashTreeRoot - 512 full validator 9.9238 ms/op 8.3969 ms/op 1.18
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 148.79 us/op 135.94 us/op 1.09
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0215 ms/op 2.4203 ms/op 0.84
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.859 ms/op 33.734 ms/op 0.83
BeaconState.hashTreeRoot - 1 balances 127.86 us/op 135.28 us/op 0.95
BeaconState.hashTreeRoot - 32 balances 1.3400 ms/op 921.95 us/op 1.45
BeaconState.hashTreeRoot - 512 balances 9.2363 ms/op 7.5291 ms/op 1.23
BeaconState.hashTreeRoot - 250000 balances 172.98 ms/op 191.46 ms/op 0.90
aggregationBits - 2048 els - zipIndexesInBitList 20.128 us/op 27.248 us/op 0.74
byteArrayEquals 32 48.353 ns/op 44.761 ns/op 1.08
Buffer.compare 32 16.520 ns/op 17.150 ns/op 0.96
byteArrayEquals 1024 1.2855 us/op 1.3317 us/op 0.97
Buffer.compare 1024 24.791 ns/op 24.602 ns/op 1.01
byteArrayEquals 16384 20.198 us/op 21.293 us/op 0.95
Buffer.compare 16384 174.32 ns/op 211.30 ns/op 0.82
byteArrayEquals 123687377 154.19 ms/op 160.18 ms/op 0.96
Buffer.compare 123687377 6.3198 ms/op 6.5191 ms/op 0.97
byteArrayEquals 32 - diff last byte 46.905 ns/op 47.959 ns/op 0.98
Buffer.compare 32 - diff last byte 16.367 ns/op 16.177 ns/op 1.01
byteArrayEquals 1024 - diff last byte 1.2813 us/op 1.2546 us/op 1.02
Buffer.compare 1024 - diff last byte 24.590 ns/op 24.866 ns/op 0.99
byteArrayEquals 16384 - diff last byte 20.338 us/op 20.155 us/op 1.01
Buffer.compare 16384 - diff last byte 200.88 ns/op 175.11 ns/op 1.15
byteArrayEquals 123687377 - diff last byte 152.46 ms/op 155.47 ms/op 0.98
Buffer.compare 123687377 - diff last byte 4.6492 ms/op 5.8910 ms/op 0.79
byteArrayEquals 32 - random bytes 5.1210 ns/op 5.0600 ns/op 1.01
Buffer.compare 32 - random bytes 16.465 ns/op 16.373 ns/op 1.01
byteArrayEquals 1024 - random bytes 4.9710 ns/op 5.0330 ns/op 0.99
Buffer.compare 1024 - random bytes 19.144 ns/op 16.109 ns/op 1.19
byteArrayEquals 16384 - random bytes 5.2320 ns/op 5.0060 ns/op 1.05
Buffer.compare 16384 - random bytes 16.240 ns/op 15.967 ns/op 1.02
byteArrayEquals 123687377 - random bytes 8.0200 ns/op 8.1500 ns/op 0.98
Buffer.compare 123687377 - random bytes 20.150 ns/op 19.770 ns/op 1.02
regular array get 100000 times 33.177 us/op 31.952 us/op 1.04
wrappedArray get 100000 times 32.847 us/op 31.793 us/op 1.03
arrayWithProxy get 100000 times 10.402 ms/op 10.128 ms/op 1.03
ssz.Root.equals 44.321 ns/op 45.685 ns/op 0.97
byteArrayEquals 39.436 ns/op 38.757 ns/op 1.02
Buffer.compare 9.9460 ns/op 9.0020 ns/op 1.10
processSlot - 1 slots 14.552 us/op 20.464 us/op 0.71
processSlot - 32 slots 3.0912 ms/op 3.4663 ms/op 0.89
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.304 ms/op 38.088 ms/op 0.98
getCommitteeAssignments - req 1 vs - 250000 vc 1.8649 ms/op 1.8523 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 3.7444 ms/op 3.6381 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 3.9691 ms/op 3.9471 ms/op 1.01
findModifiedValidators - 10000 modified validators 286.05 ms/op 260.55 ms/op 1.10
findModifiedValidators - 1000 modified validators 166.27 ms/op 173.89 ms/op 0.96
findModifiedValidators - 100 modified validators 189.65 ms/op 163.75 ms/op 1.16
findModifiedValidators - 10 modified validators 157.08 ms/op 160.64 ms/op 0.98
findModifiedValidators - 1 modified validators 168.32 ms/op 177.28 ms/op 0.95
findModifiedValidators - no difference 169.37 ms/op 168.78 ms/op 1.00
compare ViewDUs 3.0107 s/op 3.1476 s/op 0.96
compare each validator Uint8Array 1.9660 s/op 1.5719 s/op 1.25
compare ViewDU to Uint8Array 752.86 ms/op 1.0432 s/op 0.72
migrate state 1000000 validators, 24 modified, 0 new 710.92 ms/op 747.21 ms/op 0.95
migrate state 1000000 validators, 1700 modified, 1000 new 940.93 ms/op 903.52 ms/op 1.04
migrate state 1000000 validators, 3400 modified, 2000 new 1.1388 s/op 1.1006 s/op 1.03
migrate state 1500000 validators, 24 modified, 0 new 644.91 ms/op 689.40 ms/op 0.94
migrate state 1500000 validators, 1700 modified, 1000 new 966.72 ms/op 869.44 ms/op 1.11
migrate state 1500000 validators, 3400 modified, 2000 new 1.1516 s/op 978.41 ms/op 1.18
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.9700 ns/op 6.4800 ns/op 1.08
state getBlockRootAtSlot - 250000 vs - 7PWei 416.17 ns/op 400.10 ns/op 1.04
computeProposers - vc 250000 5.6707 ms/op 5.5577 ms/op 1.02
computeEpochShuffling - vc 250000 36.418 ms/op 35.915 ms/op 1.01
getNextSyncCommittee - vc 250000 101.45 ms/op 97.955 ms/op 1.04
computeSigningRoot for AttestationData 21.604 us/op 14.733 us/op 1.47
hash AttestationData serialized data then Buffer.toString(base64) 1.3102 us/op 1.2239 us/op 1.07
toHexString serialized data 835.52 ns/op 819.88 ns/op 1.02
Buffer.toString(base64) 153.85 ns/op 150.73 ns/op 1.02
nodejs block root to RootHex using toHex 124.38 ns/op 110.53 ns/op 1.13
nodejs block root to RootHex using toRootHex 83.138 ns/op 71.189 ns/op 1.17
browser block root to RootHex using the deprecated toHexString 212.25 ns/op 212.09 ns/op 1.00
browser block root to RootHex using toHex 169.73 ns/op 178.01 ns/op 0.95
browser block root to RootHex using toRootHex 152.84 ns/op 156.49 ns/op 0.98

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 3cd2f16 into unstable Oct 28, 2024
20 checks passed
@wemeetagain wemeetagain deleted the nflaig/move-with-bytes branch October 28, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants