Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

jesus christ

rust's compilation times are as terrible as c++'s?




I don't know about Him, but at least when working with C++ I feel the compile time is entirely up to deliberate tradeoffs. With better planning and more effort made with forward headers, better implementation boundaries w/pimpl like constructs, and otherwise linking, and avoiding meta-programming entirely, I've not found it to be an issue.

Incremental C++ builds can be lightning fast, or it can be ridiculously slow. I've worked on large projects where change + incremental compile + test was less than 5 seconds. And I've worked with project where no effort was made where the same could take 10 minutes.


Keeping your C++ compilation times reasonable requires eternal vigilance (or a distributed system with aggressive caching).


In my experience Rust is faster for full clean builds, even if you use slow dependencies like Serde.

However C++'s compilation units are smaller than Rust's which helps it to have faster incremental compilation times for small changes.

So, same order of magnitude basically.


It's the same ballpark


In my experience (C++ dev at work) C++ generally feels slower than Rust.

Edit: I quickly realised, this might only because of Rust's—in my opinion—superior type system and tooling, so maybe it just requires less waiting for compilations than when working C++.

Edit 2: I've never actually measured Rust compilation times, but even for large-ish graphical codebases (wezterm, alacritty, bevy games) I've compiled from scratch, it felt noticeably faster even then.


I think we must do better

AAA games need less resources than those tree walkers




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: