Commit graph

4 commits

Author SHA1 Message Date
Jan Hohenheim
8dd5692b3e
Add nightly hint to config.toml (#12257)
# Objective

- The build on Windows currently fails on stable when using the
`config.toml` as described but commenting out all lines that say
"Nightly"

## Solution

- Add a missing nightly specifier for a flag that won't run on stable
2024-03-02 14:41:37 +00:00
Doonv
d7c65e40ee
Use -Z threads=0 option in config_fast_builds.toml (#11541)
# Objective

Improve compile times.

## Solution

The `-Z threads=0` option has been introduced into nightly rust somewhat
recently, and was showcased in this [rust-lang
article](https://blog.rust-lang.org/2023/11/09/parallel-rustc.html).
This option improves multithreading in rust and speeds up compilation. I
added this option to `config_fast_builds.toml` so others can also use
this option to improve compile times.

`-Z threads=0` automatically uses the same amount of threads as the
amount of threads in your system (See [rustc source
code](6b4f1c5e78/compiler/rustc_session/src/options.rs (L617))).

### Benchmarks

> **Disclaimer:** This section was written before I knew of `-Z
threads=0`, so it uses `-Z threads=8` instead.

I compiled bevy with/without the `-Z threads=8` and saw about a 7%
improvement in compliation times on my Kubuntu system with a 13th Gen
Intel® Core™ i5-13400.

Also the compile times go down over time, probably because I had other
things running in the background.

#### Without `-Z threads=8` 

- 42.33s
- 40.90s
- 38.27s
- 38.07s
- 37.17s
- 37.67s
- 36.63s
- 37.24s

**Average**: 38.535

#### With `-Z threads=8`

- 36.77s
- 39.50s
- 38.86s
- 35.61s
- 34.37s
- 34.32s
- 34.44s
- 33.74s

**Average**: 35.95125
2024-01-29 23:13:22 +00:00
Doonv
a93cefe2cf
Improve config_fast_builds.toml (#11529)
# Objective

Theres no explaination for what the compiler flags
`config_fast_builds.toml` do

## Solution

Explain what the flags in `config_fast_builds.toml` do.
2024-01-25 19:07:51 +00:00
Doonv
98087139a1
Add .toml extension to .cargo/config_fast_builds (#11506)
# Objective

`config_fast_builds` has no highlighting.

## Solution

Add `.toml` extension to `.cargo/config_fast_builds` so it has
highlighting
2024-01-24 15:20:34 +00:00
Renamed from .cargo/config_fast_builds (Browse further)