lighthouse/book/src
Michael Sproul f77e3bc0ad Add maxperf build profile (#3608)
## Proposed Changes

Add a new Cargo compilation profile called `maxperf` which enables more aggressive compiler optimisations at the expense of compilation time.

Some rough initial benchmarks show that this can provide up to a 25% reduction to run time for CPU bound tasks like block processing: https://docs.google.com/spreadsheets/d/15jHuZe7lLHhZq9Nw8kc6EL0Qh_N_YAYqkW2NQ_Afmtk/edit

The numbers in that spreadsheet compare the `consensus-context` branch from #3604 to the same branch compiled with the `maxperf` profile using:

```
PROFILE=maxperf make install-lcli
```

## Additional Info

The downsides of the maxperf profile are:

- It increases compile times substantially, which will particularly impact low-spec hardware. Compiling `lcli` is about 3x slower. Compiling Lighthouse is about 5x slower on my 5950X: 17m 38s rather than 3m 28s.

As a result I think we should not enable this everywhere by default.

- **Option 1**: enable by default for our released binaries. This gives the majority of users the fastest version of `lighthouse` possible, at the expense of slowing down our release CI. Source builds will continue to use the default `release` profile unless users opt-in to `maxperf`.
- **Option 2**: enable by default for source builds. This gives users building from source an edge, but makes them pay for it with compilation time. 

I think I would prefer Option 1. I'll try doing some benchmarking to see how long a maxperf build of Lighthouse would take on GitHub actions.

Credit to Nicholas Nethercote for documenting these options in the Rust Performance Book: https://nnethercote.github.io/perf-book/build-configuration.html.
2022-09-29 06:13:33 +00:00
..
css Make API friendly to block explorers (#702) 2019-12-19 11:45:28 +11:00
js Add support for multiple testnet flags (#1396) 2020-07-29 06:39:29 +00:00
advanced_database.md Reformat tables and add borders (#3377) 2022-07-27 00:51:07 +00:00
advanced_metrics.md Configurable monitoring endpoint frequency (#3530) 2022-09-05 08:29:00 +00:00
advanced_networking.md Fixing a few typos / documentation (#3531) 2022-09-05 04:50:48 +00:00
advanced-datadir.md Fixing a few typos / documentation (#3531) 2022-09-05 04:50:48 +00:00
advanced-pre-releases.md Fix links in docs (#3219) 2022-05-31 06:09:07 +00:00
advanced-release-candidates.md Use "release candidate" in book (#2920) 2022-01-17 06:09:58 +00:00
advanced.md Document the freezer DB space-time trade-off (#808) 2020-01-20 10:01:58 +11:00
api-bn.md Correct typos book (#3099) 2022-03-20 22:48:15 +00:00
api-lighthouse.md Merge readiness endpoint (#3349) 2022-07-21 05:45:39 +00:00
api-vc-auth-header.md Implement standard keystore API (#2736) 2022-01-30 23:22:04 +00:00
api-vc-endpoints.md Reformat tables and add borders (#3377) 2022-07-27 00:51:07 +00:00
api-vc-sig-header.md Implement VC API (#1657) 2020-10-02 09:42:19 +00:00
api-vc.md Implement standard keystore API (#2736) 2022-01-30 23:22:04 +00:00
api.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
builders.md Add guide to MEV logs (#3611) 2022-09-28 17:45:09 +00:00
checkpoint-sync.md Use generic domain for community checkpoint sync example (#3560) 2022-09-10 01:35:11 +00:00
cli.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
contributing.md [Contribution docs] Add GitPOAP Badge to Display Number of Minted GitPOAPs for Contributors (#3343) 2022-08-09 02:27:04 +00:00
cross-compiling.md Add maxperf build profile (#3608) 2022-09-29 06:13:33 +00:00
database-migrations.md Refactor op pool for speed and correctness (#3312) 2022-08-29 09:10:26 +00:00
docker.md Fix some typos (#3376) 2022-07-27 00:51:06 +00:00
faq.md Fixing a few typos / documentation (#3531) 2022-09-05 04:50:48 +00:00
graffiti.md Update graffiti.md (#3537) 2022-09-05 08:29:02 +00:00
homebrew.md Document Homebrew package (#2885) 2022-01-08 01:15:07 +00:00
http.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
installation-binaries.md More merge doc updates (#3509) 2022-08-26 21:47:50 +00:00
installation-priorities.md Reformat tables and add borders (#3377) 2022-07-27 00:51:07 +00:00
installation-source.md Add maxperf build profile (#3608) 2022-09-29 06:13:33 +00:00
installation.md More merge doc updates (#3509) 2022-08-26 21:47:50 +00:00
intro.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
key-management.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
key-recovery.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
mainnet-validator.md Fix some typos (#3376) 2022-07-27 00:51:06 +00:00
merge-migration.md More merge doc updates (#3509) 2022-08-26 21:47:50 +00:00
pi.md Fix broken links in book (#2912) 2022-01-14 00:38:04 +00:00
redundancy.md Fixing a few typos / documentation (#3531) 2022-09-05 04:50:48 +00:00
setup.md Libp2p v0.48.0 upgrade (#3547) 2022-09-29 01:50:11 +00:00
slasher.md Modularise slasher backend (#3443) 2022-08-15 01:30:56 +00:00
slashing-protection.md Fix some typos (#3376) 2022-07-27 00:51:06 +00:00
suggested-fee-recipient.md remove strict fee recipient docs (#3551) 2022-09-08 00:06:25 +00:00
SUMMARY.md Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
system-requirements.md Document system requirements (#1934) 2020-11-19 21:23:56 +00:00
testnet-validator.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
validator-create.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
validator-doppelganger.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
validator-import-launchpad.md Fix some typos (#3376) 2022-07-27 00:51:06 +00:00
validator-inclusion.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00
validator-management.md Change --testnet flag to --network (#1751) 2020-11-23 23:54:03 +00:00
validator-monitoring.md Configurable monitoring endpoint frequency (#3530) 2022-09-05 08:29:00 +00:00
validator-web3signer.md Add client authentication to Web3Signer validators (#3170) 2022-05-18 23:14:37 +00:00
voluntary-exit.md Correct typos book (#3099) 2022-03-20 22:48:15 +00:00
wallet-create.md Rename Eth1/Eth2 in documents (#3021) 2022-03-02 01:05:08 +00:00