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

Remove babel #2933

Merged
merged 2 commits into from
Aug 10, 2021
Merged

Remove babel #2933

merged 2 commits into from
Aug 10, 2021

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Aug 10, 2021

Motivation

Through multiple tsc version it has been shown that babel does not add any performance increase in code compilation. Lodestar is not distributed directly to the browser, but only to NodeJS. We should only ensure compatibility with NodeJS v12.9.0. Browser compatibility should be ensured by Lodestar consumers, such as the Lightclient demo UI, which has babel and transpiles the code there.

See "StackOverflow Why do I need Babel JS?" https://stackoverflow.com/questions/39401836/why-do-i-need-babel-js

Description

Compile code with Typescript aiming at doing the least transformations possible to ensure high performance of direct NodeJS consumers.


PS: Sometimes the generated code by transpilers to support CommonJS has shown up in profilers, indicating it has a performance cost. We should:

@codeclimate
Copy link

codeclimate bot commented Aug 10, 2021

Code Climate has analyzed commit 011ef7d and detected 0 issues on this pull request.

View more on Code Climate.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2021

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 67e71dd Previous: 05e8265 Ratio
Process block - 250000 vs - 7PWei - with 0 validator exit 9.1636 ms/op 354.94 us/op 25.82
shuffle list - 16384 els 26.493 ms/op 1.5060 ms/op 17.59
shuffle list - 250000 els 364.41 ms/op 21.502 ms/op 16.95
Full benchmark results
Benchmark suite Current: 67e71dd Previous: 05e8265 Ratio
getCommitteeAssignments - req 1000 vs - 250000 vc 7.8467 ms/op 7.8467 ms/op 1.00
epoch altair - 250000 vs - 7PWei - processInactivityUpdates 2.5107 s/op 2.2111 s/op 1.14
epoch altair - 250000 vs - 7PWei - processRewardsAndPenalties 1.1006 s/op 883.38 ms/op 1.25
epoch altair - 250000 vs - 7PWei - processParticipationFlagUpdates 470.43 ms/op 353.07 ms/op 1.33
Process block - 250000 vs - 7PWei - with 0 validator exit 9.1636 ms/op 354.94 us/op 25.82
Process block - 250000 vs - 7PWei - with 1 validator exit 89.736 ms/op 32.650 ms/op 2.75
Process block - 250000 vs - 7PWei - with 16 validator exits 29.881 ms/op 26.815 ms/op 1.11
epoch phase0 - 250000 vs - 7PWei - beforeProcessEpoch 1.7145 s/op 634.02 ms/op 2.70
epoch phase0 - 250000 vs - 7PWei - processRewardsAndPenalties 771.82 ms/op 458.47 ms/op 1.68
epoch phase0 - 250000 vs - 7PWei - processEffectiveBalanceUpdates 108.23 ms/op 109.10 ms/op 0.99
getAttestationDeltas - 250000 vs - 7PWei 125.27 ms/op 92.590 ms/op 1.35
processSlots - 250000 vs - 7PWei - 32 empty slots 3.3836 s/op 4.5431 s/op 0.74
shuffle list - 16384 els 26.493 ms/op 1.5060 ms/op 17.59
shuffle list - 250000 els 364.41 ms/op 21.502 ms/op 16.95
getPubkeys - persistent - req 1000 vs - 250000 vc 19.477 us/op 15.169 us/op 1.28
BLS verify - blst-native 2.0859 ms/op 1.6439 ms/op 1.27
BLS verifyMultipleSignatures 3 - blst-native 4.1967 ms/op 3.3547 ms/op 1.25
BLS verifyMultipleSignatures 8 - blst-native 9.1762 ms/op 7.2510 ms/op 1.27
BLS verifyMultipleSignatures 32 - blst-native 34.231 ms/op 28.700 ms/op 1.19
BLS aggregatePubkeys 32 - blst-native 47.597 us/op 35.819 us/op 1.33
BLS aggregatePubkeys 128 - blst-native 184.10 us/op 137.18 us/op 1.34
getAttestationsForBlock 79.267 ms/op 86.567 ms/op 0.92
validate gossip signedAggregateAndProof - struct 5.4607 ms/op 5.3061 ms/op 1.03
validate gossip signedAggregateAndProof - treeBacked 5.3298 ms/op 4.0418 ms/op 1.32
validate gossip attestation - struct 2.4470 ms/op 1.8708 ms/op 1.31
validate gossip attestation - treeBacked 2.5060 ms/op 1.9100 ms/op 1.31

by benchmarkbot/action

tsconfig.build.json Outdated Show resolved Hide resolved
@wemeetagain wemeetagain merged commit 5c48527 into master Aug 10, 2021
@wemeetagain wemeetagain deleted the dapplion/remove-babel branch August 10, 2021 20:13
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.

None yet

2 participants