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: benchmark bls signature deserialization #5922

Merged
merged 4 commits into from
Sep 5, 2023

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Aug 31, 2023

Motivation

With v1.11.0, we deserialize and validate signature on the main thread so we need to benchmark and add more comments for the concerned code

Description

@twoeths twoeths requested a review from a team as a code owner August 31, 2023 03:41
@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: aca2ecb Previous: 22d32d7 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 793.02 us/op 497.67 us/op 1.59
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 75.702 us/op 77.116 us/op 0.98
BLS verify - blst-native 1.2874 ms/op 1.3106 ms/op 0.98
BLS verifyMultipleSignatures 3 - blst-native 2.6998 ms/op 2.7512 ms/op 0.98
BLS verifyMultipleSignatures 8 - blst-native 5.9405 ms/op 6.0243 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst-native 21.673 ms/op 22.002 ms/op 0.99
BLS verifyMultipleSignatures 64 - blst-native 42.684 ms/op 43.442 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst-native 84.702 ms/op 84.658 ms/op 1.00
BLS deserializing 10000 signatures 851.49 ms/op
BLS deserializing 100000 signatures 8.6237 s/op
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2817 ms/op 1.3174 ms/op 0.97
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4363 ms/op 1.5419 ms/op 0.93
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2087 ms/op 2.2924 ms/op 0.96
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.2410 ms/op 3.4024 ms/op 0.95
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.3563 ms/op 5.5246 ms/op 0.97
BLS aggregatePubkeys 32 - blst-native 24.233 us/op 25.250 us/op 0.96
BLS aggregatePubkeys 128 - blst-native 95.349 us/op 99.237 us/op 0.96
getAttestationsForBlock 34.164 ms/op 35.695 ms/op 0.96
isKnown best case - 1 super set check 263.00 ns/op 283.00 ns/op 0.93
isKnown normal case - 2 super set checks 261.00 ns/op 290.00 ns/op 0.90
isKnown worse case - 16 super set checks 255.00 ns/op 278.00 ns/op 0.92
CheckpointStateCache - add get delete 4.9310 us/op 5.3060 us/op 0.93
validate api signedAggregateAndProof - struct 2.6393 ms/op 2.7516 ms/op 0.96
validate gossip signedAggregateAndProof - struct 2.6477 ms/op 2.7495 ms/op 0.96
validate gossip attestation - vc 640000 1.3078 ms/op 1.3280 ms/op 0.98
batch validate gossip attestation - vc 640000 - chunk 32 145.15 us/op 147.34 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 64 126.25 us/op 127.96 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 128 113.64 us/op 118.81 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 111.16 us/op 113.30 us/op 0.98
pickEth1Vote - no votes 1.0821 ms/op 1.2487 ms/op 0.87
pickEth1Vote - max votes 9.5456 ms/op 10.561 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.2449 ms/op 8.7220 ms/op 0.95
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 13.958 ms/op 13.417 ms/op 1.04
pickEth1Vote - Eth1Data fastSerialize value x2048 547.66 us/op 563.78 us/op 0.97
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.4164 ms/op 4.1501 ms/op 1.55
bytes32 toHexString 446.00 ns/op 456.00 ns/op 0.98
bytes32 Buffer.toString(hex) 287.00 ns/op 280.00 ns/op 1.02
bytes32 Buffer.toString(hex) from Uint8Array 414.00 ns/op 412.00 ns/op 1.00
bytes32 Buffer.toString(hex) + 0x 275.00 ns/op 279.00 ns/op 0.99
Object access 1 prop 0.14100 ns/op 0.15300 ns/op 0.92
Map access 1 prop 0.12900 ns/op 0.14300 ns/op 0.90
Object get x1000 7.0080 ns/op 7.7210 ns/op 0.91
Map get x1000 0.48700 ns/op 0.62100 ns/op 0.78
Object set x1000 44.424 ns/op 49.821 ns/op 0.89
Map set x1000 35.052 ns/op 38.756 ns/op 0.90
Return object 10000 times 0.22110 ns/op 0.23440 ns/op 0.94
Throw Error 10000 times 3.6240 us/op 3.8575 us/op 0.94
fastMsgIdFn sha256 / 200 bytes 3.0480 us/op 3.2440 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 264.00 ns/op 262.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 200 bytes 318.00 ns/op 339.00 ns/op 0.94
fastMsgIdFn sha256 / 1000 bytes 10.600 us/op 11.330 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 387.00 ns/op 399.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 392.00 ns/op 401.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 97.164 us/op 103.18 us/op 0.94
fastMsgIdFn h32 xxhash / 10000 bytes 1.7600 us/op 1.9140 us/op 0.92
fastMsgIdFn h64 xxhash / 10000 bytes 1.2440 us/op 1.3070 us/op 0.95
enrSubnets - fastDeserialize 64 bits 1.1460 us/op 1.1580 us/op 0.99
enrSubnets - ssz BitVector 64 bits 405.00 ns/op 404.00 ns/op 1.00
enrSubnets - fastDeserialize 4 bits 158.00 ns/op 153.00 ns/op 1.03
enrSubnets - ssz BitVector 4 bits 400.00 ns/op 405.00 ns/op 0.99
prioritizePeers score -10:0 att 32-0.1 sync 2-0 96.189 us/op 95.280 us/op 1.01
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 118.63 us/op 116.60 us/op 1.02
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 154.18 us/op 152.78 us/op 1.01
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 275.43 us/op 277.68 us/op 0.99
prioritizePeers score 0:0 att 64-1 sync 4-1 322.34 us/op 337.49 us/op 0.96
array of 16000 items push then shift 1.5534 us/op 1.6209 us/op 0.96
LinkedList of 16000 items push then shift 8.7810 ns/op 8.8320 ns/op 0.99
array of 16000 items push then pop 66.831 ns/op 93.912 ns/op 0.71
LinkedList of 16000 items push then pop 8.5320 ns/op 8.6450 ns/op 0.99
array of 24000 items push then shift 2.3099 us/op 2.4501 us/op 0.94
LinkedList of 24000 items push then shift 8.7650 ns/op 8.8320 ns/op 0.99
array of 24000 items push then pop 91.164 ns/op 112.72 ns/op 0.81
LinkedList of 24000 items push then pop 8.1110 ns/op 8.6080 ns/op 0.94
intersect bitArray bitLen 8 6.3310 ns/op 6.7340 ns/op 0.94
intersect array and set length 8 50.908 ns/op 54.855 ns/op 0.93
intersect bitArray bitLen 128 29.774 ns/op 31.492 ns/op 0.95
intersect array and set length 128 699.47 ns/op 746.72 ns/op 0.94
bitArray.getTrueBitIndexes() bitLen 128 1.4090 us/op 1.3770 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 248 2.3230 us/op 2.3670 us/op 0.98
bitArray.getTrueBitIndexes() bitLen 512 4.3290 us/op 4.5380 us/op 0.95
Buffer.concat 32 items 919.00 ns/op 905.00 ns/op 1.02
Uint8Array.set 32 items 2.0970 us/op 1.9550 us/op 1.07
Set add up to 64 items then delete first 4.0398 us/op 4.2726 us/op 0.95
OrderedSet add up to 64 items then delete first 5.0947 us/op 5.3414 us/op 0.95
Set add up to 64 items then delete last 4.3411 us/op 4.5611 us/op 0.95
OrderedSet add up to 64 items then delete last 5.4139 us/op 5.6222 us/op 0.96
Set add up to 64 items then delete middle 4.3027 us/op 4.4860 us/op 0.96
OrderedSet add up to 64 items then delete middle 6.6512 us/op 7.0785 us/op 0.94
Set add up to 128 items then delete first 8.8392 us/op 9.3680 us/op 0.94
OrderedSet add up to 128 items then delete first 11.778 us/op 12.645 us/op 0.93
Set add up to 128 items then delete last 8.5850 us/op 9.6640 us/op 0.89
OrderedSet add up to 128 items then delete last 10.961 us/op 11.643 us/op 0.94
Set add up to 128 items then delete middle 8.5195 us/op 9.0540 us/op 0.94
OrderedSet add up to 128 items then delete middle 15.932 us/op 17.467 us/op 0.91
Set add up to 256 items then delete first 17.895 us/op 19.916 us/op 0.90
OrderedSet add up to 256 items then delete first 23.814 us/op 25.890 us/op 0.92
Set add up to 256 items then delete last 17.064 us/op 19.365 us/op 0.88
OrderedSet add up to 256 items then delete last 22.122 us/op 23.601 us/op 0.94
Set add up to 256 items then delete middle 17.184 us/op 18.597 us/op 0.92
OrderedSet add up to 256 items then delete middle 42.529 us/op 46.929 us/op 0.91
transfer serialized Status (84 B) 1.8760 us/op 1.9570 us/op 0.96
copy serialized Status (84 B) 1.6040 us/op 1.6730 us/op 0.96
transfer serialized SignedVoluntaryExit (112 B) 2.1220 us/op 2.0290 us/op 1.05
copy serialized SignedVoluntaryExit (112 B) 1.6860 us/op 1.7330 us/op 0.97
transfer serialized ProposerSlashing (416 B) 2.6930 us/op 2.5500 us/op 1.06
copy serialized ProposerSlashing (416 B) 2.3040 us/op 2.6430 us/op 0.87
transfer serialized Attestation (485 B) 2.8580 us/op 2.8050 us/op 1.02
copy serialized Attestation (485 B) 2.5530 us/op 2.6820 us/op 0.95
transfer serialized AttesterSlashing (33232 B) 2.3960 us/op 2.7170 us/op 0.88
copy serialized AttesterSlashing (33232 B) 4.4220 us/op 6.8210 us/op 0.65
transfer serialized Small SignedBeaconBlock (128000 B) 2.3930 us/op 2.8540 us/op 0.84
copy serialized Small SignedBeaconBlock (128000 B) 12.256 us/op 12.839 us/op 0.95
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3590 us/op 2.8370 us/op 1.18
copy serialized Avg SignedBeaconBlock (200000 B) 17.600 us/op 19.851 us/op 0.89
transfer serialized BlobsSidecar (524380 B) 3.0400 us/op 3.1480 us/op 0.97
copy serialized BlobsSidecar (524380 B) 76.862 us/op 122.68 us/op 0.63
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2780 us/op 3.2450 us/op 1.01
copy serialized Big SignedBeaconBlock (1000000 B) 143.45 us/op 172.73 us/op 0.83
pass gossip attestations to forkchoice per slot 3.7454 ms/op 3.7546 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 693.42 us/op 669.58 us/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 5.2519 ms/op 4.1263 ms/op 1.27
forkChoice updateHead vc 1000000 bc 64 eq 0 6.8223 ms/op 8.4221 ms/op 0.81
forkChoice updateHead vc 600000 bc 320 eq 0 4.1148 ms/op 4.1872 ms/op 0.98
forkChoice updateHead vc 600000 bc 1200 eq 0 4.0475 ms/op 4.2378 ms/op 0.96
forkChoice updateHead vc 600000 bc 7200 eq 0 4.9188 ms/op 5.1665 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 1000 11.048 ms/op 11.146 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 10000 12.027 ms/op 12.118 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 300000 15.725 ms/op 15.530 ms/op 1.01
computeDeltas 500000 validators 300 proto nodes 6.1395 ms/op 6.2775 ms/op 0.98
computeDeltas 500000 validators 1200 proto nodes 6.0777 ms/op 6.2043 ms/op 0.98
computeDeltas 500000 validators 7200 proto nodes 6.0337 ms/op 6.3687 ms/op 0.95
computeDeltas 750000 validators 300 proto nodes 9.1237 ms/op 9.3584 ms/op 0.97
computeDeltas 750000 validators 1200 proto nodes 9.1253 ms/op 9.4284 ms/op 0.97
computeDeltas 750000 validators 7200 proto nodes 9.0761 ms/op 9.4165 ms/op 0.96
computeDeltas 1400000 validators 300 proto nodes 17.189 ms/op 17.940 ms/op 0.96
computeDeltas 1400000 validators 1200 proto nodes 17.142 ms/op 18.161 ms/op 0.94
computeDeltas 1400000 validators 7200 proto nodes 17.508 ms/op 17.926 ms/op 0.98
computeDeltas 2100000 validators 300 proto nodes 26.146 ms/op 26.956 ms/op 0.97
computeDeltas 2100000 validators 1200 proto nodes 26.023 ms/op 26.618 ms/op 0.98
computeDeltas 2100000 validators 7200 proto nodes 26.035 ms/op 26.723 ms/op 0.97
computeProposerBoostScoreFromBalances 500000 validators 3.1153 ms/op 3.1786 ms/op 0.98
computeProposerBoostScoreFromBalances 750000 validators 3.1132 ms/op 3.1749 ms/op 0.98
computeProposerBoostScoreFromBalances 1400000 validators 3.1696 ms/op 3.1851 ms/op 1.00
computeProposerBoostScoreFromBalances 2100000 validators 3.1699 ms/op 3.2050 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei normalcase 2.2193 ms/op 2.2287 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei worstcase 3.2509 ms/op 3.2752 ms/op 0.99
altair processAttestation - setStatus - 1/6 committees join 174.29 us/op 174.86 us/op 1.00
altair processAttestation - setStatus - 1/3 committees join 338.13 us/op 350.42 us/op 0.96
altair processAttestation - setStatus - 1/2 committees join 453.35 us/op 471.47 us/op 0.96
altair processAttestation - setStatus - 2/3 committees join 571.38 us/op 587.96 us/op 0.97
altair processAttestation - setStatus - 4/5 committees join 768.24 us/op 792.50 us/op 0.97
altair processAttestation - setStatus - 100% committees join 896.98 us/op 936.53 us/op 0.96
altair processBlock - 250000 vs - 7PWei normalcase 9.4912 ms/op 9.1007 ms/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase hashState 16.475 ms/op 17.193 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase 38.099 ms/op 37.076 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 55.965 ms/op 57.507 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4117 ms/op 2.4179 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei worstcase 28.850 ms/op 30.393 ms/op 0.95
altair processEth1Data - 250000 vs - 7PWei normalcase 468.59 us/op 515.26 us/op 0.91
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.7350 us/op 10.804 us/op 0.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 57.560 us/op 58.455 us/op 0.98
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.542 us/op 16.873 us/op 1.10
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.3620 us/op 10.340 us/op 0.71
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 121.25 us/op 181.49 us/op 0.67
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0347 ms/op 1.2781 ms/op 0.81
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4934 ms/op 1.4185 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.3846 ms/op 1.7001 ms/op 0.81
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.2416 ms/op 3.0185 ms/op 1.07
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2678 ms/op 2.2859 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.0548 ms/op 5.1219 ms/op 0.99
Tree 40 250000 create 323.22 ms/op 312.79 ms/op 1.03
Tree 40 250000 get(125000) 190.96 ns/op 190.21 ns/op 1.00
Tree 40 250000 set(125000) 950.81 ns/op 941.50 ns/op 1.01
Tree 40 250000 toArray() 17.237 ms/op 18.039 ms/op 0.96
Tree 40 250000 iterate all - toArray() + loop 17.302 ms/op 18.062 ms/op 0.96
Tree 40 250000 iterate all - get(i) 64.822 ms/op 64.105 ms/op 1.01
MutableVector 250000 create 11.415 ms/op 11.104 ms/op 1.03
MutableVector 250000 get(125000) 6.3470 ns/op 6.3690 ns/op 1.00
MutableVector 250000 set(125000) 229.96 ns/op 268.88 ns/op 0.86
MutableVector 250000 toArray() 2.8625 ms/op 3.3092 ms/op 0.87
MutableVector 250000 iterate all - toArray() + loop 3.0245 ms/op 3.2121 ms/op 0.94
MutableVector 250000 iterate all - get(i) 1.5055 ms/op 1.5063 ms/op 1.00
Array 250000 create 2.6053 ms/op 2.7601 ms/op 0.94
Array 250000 clone - spread 1.0223 ms/op 971.46 us/op 1.05
Array 250000 get(125000) 0.50300 ns/op 0.49600 ns/op 1.01
Array 250000 set(125000) 0.57800 ns/op 0.57100 ns/op 1.01
Array 250000 iterate all - loop 79.665 us/op 81.701 us/op 0.98
effectiveBalanceIncrements clone Uint8Array 300000 23.441 us/op 23.536 us/op 1.00
effectiveBalanceIncrements clone MutableVector 300000 278.00 ns/op 263.00 ns/op 1.06
effectiveBalanceIncrements rw all Uint8Array 300000 172.48 us/op 175.57 us/op 0.98
effectiveBalanceIncrements rw all MutableVector 300000 74.224 ms/op 75.643 ms/op 0.98
phase0 afterProcessEpoch - 250000 vs - 7PWei 110.77 ms/op 111.82 ms/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 37.443 ms/op 37.974 ms/op 0.99
altair processEpoch - mainnet_e81889 308.85 ms/op 314.20 ms/op 0.98
mainnet_e81889 - altair beforeProcessEpoch 44.822 ms/op 59.733 ms/op 0.75
mainnet_e81889 - altair processJustificationAndFinalization 13.736 us/op 14.995 us/op 0.92
mainnet_e81889 - altair processInactivityUpdates 5.0535 ms/op 5.5600 ms/op 0.91
mainnet_e81889 - altair processRewardsAndPenalties 64.116 ms/op 63.716 ms/op 1.01
mainnet_e81889 - altair processRegistryUpdates 2.7600 us/op 2.5940 us/op 1.06
mainnet_e81889 - altair processSlashings 422.00 ns/op 415.00 ns/op 1.02
mainnet_e81889 - altair processEth1DataReset 595.00 ns/op 507.00 ns/op 1.17
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2277 ms/op 1.2120 ms/op 1.01
mainnet_e81889 - altair processSlashingsReset 3.7640 us/op 3.8440 us/op 0.98
mainnet_e81889 - altair processRandaoMixesReset 5.3440 us/op 4.6430 us/op 1.15
mainnet_e81889 - altair processHistoricalRootsUpdate 559.00 ns/op 1.0790 us/op 0.52
mainnet_e81889 - altair processParticipationFlagUpdates 2.1650 us/op 1.9020 us/op 1.14
mainnet_e81889 - altair processSyncCommitteeUpdates 506.00 ns/op 549.00 ns/op 0.92
mainnet_e81889 - altair afterProcessEpoch 119.56 ms/op 125.08 ms/op 0.96
capella processEpoch - mainnet_e217614 990.03 ms/op 1.0546 s/op 0.94
mainnet_e217614 - capella beforeProcessEpoch 220.64 ms/op 261.63 ms/op 0.84
mainnet_e217614 - capella processJustificationAndFinalization 13.304 us/op 13.615 us/op 0.98
mainnet_e217614 - capella processInactivityUpdates 18.177 ms/op 17.301 ms/op 1.05
mainnet_e217614 - capella processRewardsAndPenalties 277.05 ms/op 278.45 ms/op 0.99
mainnet_e217614 - capella processRegistryUpdates 18.747 us/op 20.395 us/op 0.92
mainnet_e217614 - capella processSlashings 537.00 ns/op 528.00 ns/op 1.02
mainnet_e217614 - capella processEth1DataReset 505.00 ns/op 371.00 ns/op 1.36
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.9434 ms/op 4.0397 ms/op 0.98
mainnet_e217614 - capella processSlashingsReset 2.3290 us/op 2.1890 us/op 1.06
mainnet_e217614 - capella processRandaoMixesReset 4.5440 us/op 4.5870 us/op 0.99
mainnet_e217614 - capella processHistoricalRootsUpdate 659.00 ns/op 650.00 ns/op 1.01
mainnet_e217614 - capella processParticipationFlagUpdates 2.0550 us/op 2.7800 us/op 0.74
mainnet_e217614 - capella afterProcessEpoch 308.18 ms/op 295.02 ms/op 1.04
phase0 processEpoch - mainnet_e58758 320.01 ms/op 315.91 ms/op 1.01
mainnet_e58758 - phase0 beforeProcessEpoch 103.24 ms/op 116.14 ms/op 0.89
mainnet_e58758 - phase0 processJustificationAndFinalization 13.502 us/op 14.883 us/op 0.91
mainnet_e58758 - phase0 processRewardsAndPenalties 53.055 ms/op 52.379 ms/op 1.01
mainnet_e58758 - phase0 processRegistryUpdates 9.8240 us/op 11.478 us/op 0.86
mainnet_e58758 - phase0 processSlashings 508.00 ns/op 455.00 ns/op 1.12
mainnet_e58758 - phase0 processEth1DataReset 432.00 ns/op 377.00 ns/op 1.15
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0733 ms/op 1.0317 ms/op 1.04
mainnet_e58758 - phase0 processSlashingsReset 2.0670 us/op 2.4450 us/op 0.85
mainnet_e58758 - phase0 processRandaoMixesReset 3.8660 us/op 5.0180 us/op 0.77
mainnet_e58758 - phase0 processHistoricalRootsUpdate 568.00 ns/op 447.00 ns/op 1.27
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6840 us/op 3.3020 us/op 1.12
mainnet_e58758 - phase0 afterProcessEpoch 101.72 ms/op 100.31 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1736 ms/op 1.2488 ms/op 0.94
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4230 ms/op 1.4424 ms/op 0.99
altair processInactivityUpdates - 250000 normalcase 17.487 ms/op 24.197 ms/op 0.72
altair processInactivityUpdates - 250000 worstcase 19.622 ms/op 18.978 ms/op 1.03
phase0 processRegistryUpdates - 250000 normalcase 10.681 us/op 10.686 us/op 1.00
phase0 processRegistryUpdates - 250000 badcase_full_deposits 298.81 us/op 352.93 us/op 0.85
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.34 ms/op 112.17 ms/op 1.14
altair processRewardsAndPenalties - 250000 normalcase 54.860 ms/op 68.364 ms/op 0.80
altair processRewardsAndPenalties - 250000 worstcase 48.121 ms/op 69.005 ms/op 0.70
phase0 getAttestationDeltas - 250000 normalcase 7.6593 ms/op 7.6794 ms/op 1.00
phase0 getAttestationDeltas - 250000 worstcase 7.6269 ms/op 7.6766 ms/op 0.99
phase0 processSlashings - 250000 worstcase 2.2241 ms/op 2.4970 ms/op 0.89
altair processSyncCommitteeUpdates - 250000 148.39 ms/op 149.61 ms/op 0.99
BeaconState.hashTreeRoot - No change 260.00 ns/op 258.00 ns/op 1.01
BeaconState.hashTreeRoot - 1 full validator 50.557 us/op 50.690 us/op 1.00
BeaconState.hashTreeRoot - 32 full validator 502.24 us/op 504.99 us/op 0.99
BeaconState.hashTreeRoot - 512 full validator 5.1284 ms/op 5.2838 ms/op 0.97
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 61.421 us/op 66.468 us/op 0.92
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 846.76 us/op 883.68 us/op 0.96
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 10.840 ms/op 11.031 ms/op 0.98
BeaconState.hashTreeRoot - 1 balances 46.760 us/op 48.435 us/op 0.97
BeaconState.hashTreeRoot - 32 balances 455.76 us/op 465.96 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 4.1564 ms/op 4.3722 ms/op 0.95
BeaconState.hashTreeRoot - 250000 balances 72.249 ms/op 69.788 ms/op 1.04
aggregationBits - 2048 els - zipIndexesInBitList 14.829 us/op 14.810 us/op 1.00
regular array get 100000 times 31.658 us/op 40.527 us/op 0.78
wrappedArray get 100000 times 31.642 us/op 32.717 us/op 0.97
arrayWithProxy get 100000 times 13.629 ms/op 14.456 ms/op 0.94
ssz.Root.equals 217.00 ns/op 192.00 ns/op 1.13
byteArrayEquals 212.00 ns/op 213.00 ns/op 1.00
shuffle list - 16384 els 6.6988 ms/op 6.9417 ms/op 0.97
shuffle list - 250000 els 98.158 ms/op 101.66 ms/op 0.97
processSlot - 1 slots 8.1430 us/op 8.3950 us/op 0.97
processSlot - 32 slots 1.2973 ms/op 1.2913 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 51.286 ms/op 52.371 ms/op 0.98
getCommitteeAssignments - req 1 vs - 250000 vc 2.4818 ms/op 2.4845 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 3.6457 ms/op 3.6671 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 3.9624 ms/op 3.9789 ms/op 1.00
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5500 ns/op 4.2100 ns/op 1.08
state getBlockRootAtSlot - 250000 vs - 7PWei 851.62 ns/op 655.78 ns/op 1.30
computeProposers - vc 250000 8.7079 ms/op 8.6517 ms/op 1.01
computeEpochShuffling - vc 250000 102.61 ms/op 100.51 ms/op 1.02
getNextSyncCommittee - vc 250000 144.73 ms/op 145.79 ms/op 0.99
computeSigningRoot for AttestationData 12.471 us/op 12.334 us/op 1.01
hash AttestationData serialized data then Buffer.toString(base64) 2.2501 us/op 2.2617 us/op 0.99
toHexString serialized data 1.0922 us/op 1.0301 us/op 1.06
Buffer.toString(base64) 221.75 ns/op 201.36 ns/op 1.10

by benchmarkbot/action

Comment on lines 74 to 76
if (timer) {
timer();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be written as below, please double check syntax may be wrong

Suggested change
if (timer) {
timer();
}
timer?.()

@twoeths twoeths enabled auto-merge (squash) September 5, 2023 02:30
@twoeths twoeths merged commit 6ac8c07 into unstable Sep 5, 2023
11 checks passed
@twoeths twoeths deleted the tuyen/benchmark_bls_signature_deserialization branch September 5, 2023 02:46
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.12.0 🎉

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.

3 participants