Skip to content

Commit

Permalink
Update accelerate-build.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shamilsan committed Nov 20, 2023
1 parent 89d53df commit cba8ace
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions src/accelerate-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ RUSTC_WRAPPER=sccache CARGO_INCREMENTAL=0 cargo b -r
As `mold` doesn't support macOS we need to build `sold` manually.

```bash
git clone git@github.com:bluewhalesystems/sold.git
git clone https://github.com/bluewhalesystems/sold.git
mkdir sold/build
cd ./sold/build
# if you don't have cmake, please run:
# brew install cmake
cd sold/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ ..
cmake --build . -j $(sysctl -n hw.ncpu)
sudo cmake --build . --target install
Expand All @@ -83,29 +81,3 @@ rustflags = ["-C", "link-arg=--ld-path=/usr/local/bin/ld64.sold"]
```

Then just run `cargo b [-r]` as usually.

## Measurements

We will measure the build time on the [v1.0.1](https://github.com/gear-tech/gear/releases/tag/v1.0.1) tag of the `gear` repository:

Preparation before the build time measurements:

```bash
rm -rf target
git checkout tags/v1.0.1 -b release-v1.0.1
cargo fetch
```

### macOS / M2 / 8 cores

- Debug profile by default: 4m 09s
- Release profile by default: 6m 12s
- Debug profile with `sccache`: **4m 47s**
- Release profile with `sccache`: **4m 26s**

### macOS / M3 Pro / 12 cores

- Debug profile by default: 2m 35s
- Release profile by default: 3m 39s
- Debug profile with `sccache`: **4m 36s**
- Release profile with `sccache`: **3m 47s**

0 comments on commit cba8ace

Please sign in to comment.