Coder Social home page Coder Social logo

Comments (15)

rui314 avatar rui314 commented on July 1, 2024

If that's the case it is what it is. If linking is not the bottleneck of your build process, mold can't make it faster. Maybe your binary is relatively small?

from mold.

Mon-ius avatar Mon-ius commented on July 1, 2024

I am aware if the process I have done for configure the mold is right, the linking part normally spent over 1min to process on Intel(R) Xeon(R) Platinum 8360Y CPU @ 2.40GHz in this case.

from mold.

rui314 avatar rui314 commented on July 1, 2024

What is the overall wallclock time to build the entire source tree? What if you change a single file and rebuild it?

from mold.

Mon-ius avatar Mon-ius commented on July 1, 2024

If change single file and rebuild it when RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold" cargo build --release, it spent 34.20s/1m 11s, 34.20s is for change a single file and rebuild it, 1m 11s is overall spend.

However, when pure perform cargo build --release without any FLAGs, it spent the similar, 34.66s/1m 45s.

When perform RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold -Z threads=32" cargo +nightly build --release, 34.63s/1m 42s

Each build test after cargo clean.

from mold.

rui314 avatar rui314 commented on July 1, 2024

You don't want to run cargo clean after making a change to a file. Just change a single file and rebuild it, which is a typical scenario, and measure how much time does each build takes.

from mold.

Mon-ius avatar Mon-ius commented on July 1, 2024

As mentioned, 34.20s, 34.66s and 34.63s are the time spent by change a single file and rebuild it. So, wired is, the three build process make no different

from mold.

rui314 avatar rui314 commented on July 1, 2024

What if you do not change anything but just delete the generated executable and rebuild it?

from mold.

Mon-ius avatar Mon-ius commented on July 1, 2024

@rui314 as you request,

  • 0.14s for standard cargo build --release
  • 0.14s for RUSTFLAGS="-Z threads=32" cargo +nightly build --release
  • 0.11s for RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold" cargo build --release
  • 0.11s for RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold -Z threads=32" cargo +nightly build --release

from mold.

rui314 avatar rui314 commented on July 1, 2024

I'm not familiar with the rust build system, but aren't that the time the linkers take to link your program? If that's the case, the faster linker can't make any difference.

from mold.

Mon-ius avatar Mon-ius commented on July 1, 2024

it takes about 0.03s faster in this case. One more question, does mold compatible with https://github.com/rust-lang/rustc_codegen_cranelift

from mold.

rui314 avatar rui314 commented on July 1, 2024

Yes

from mold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.