Hacker Newsnew | past | comments | ask | show | jobs | submit | vegerot's commentslogin

Agreed! …but while we’re at it curly gang all day


Thank you for actually suggesting something! Many people say “this is unidiomatic/slow/unoptimal” but nobody is giving specifics. Thanks :)

btw the author is looking to improve the Rust version and is accepting contributions in that repo if you wanna improve the experiment


> If I made the C++ code use a custom vector and the Rust code use the standard vector, then people would complain that the Rust code was artificially shorter.

People would also complain that even though you claim “my C++ code is longer than Rust but compiles just as fast”, you’re not factoring the extra things Rust’s versions do


The author said he liked Rust and will switch to Rust if/when it builds faster than C++. So for the author at least, his answer is Rust!


Do they compile fast? If not, why not just use Rust? The author said he’ll switch to Rust when the compilation speed improves


I know the article is really detailed, and I don’t remember a lot of it either!

But he does specifically break down how much of compilation time is spent in the borrow checker, LLVM, macro expansion, etc.


Martin?


I think you two are talking past each other. He’s talking about hypotheticals, and you’re talking about what’s more common


“opt-in” in the sense that I could just multiple versions of my functions if I want to? Agreed!


Yeah, or accept a small runtime cost in exchange for a smaller binary


cool! Does quick-lint use this pattern? https://github.com/quick-lint/cpp-vs-rust


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

Search: