quick-lint/cpp-vs-rust
View on GitHub ↗ ★ 17 Rust
8 mentions on Hacker News by 4 people: 0 stories, 8 comments · first 2023-01-06 · latest 2023-01-07
20082026
-
…benchmarks show Mold for both Rust and C++. This wasn't explicitly stated in the article; sorry. https://github.com/quick-lint/cpp-vs-rust/blob/f8d31341f5cac...
comment by strager · 2023-01-07 · in A practical comparison of build and test speed between C++ and Rust -
cool! Does quick-lint use this pattern? https://github.com/quick-lint/cpp-vs-rust
comment by vegerot · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust -
I think https://github.com/quick-lint/cpp-vs-rust/blob/f8d31341f5cac... indicates Rust is using Mold too. And I get the impression that the thing unit being benchmarked is a single crate—that is, one crate 8×, 16×, 24× the size (which puts…
comment by chrismorgan · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust -
…give an example of where something in the project could be, say, 20 lines of code instead of 30? https://github.com/quick-lint/cpp-vs-rust/tree/master/rust
comment by strager · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust -
…like C++'s strchr and strspn. (I think Rust's str has these, but not [u8].) For example: C++: https://github.com/quick-lint/cpp-vs-rust/blob/f8d31341f5cac... std::size_t length = std::strcspn(c, separators); if (c[length] == '\0') { return…
comment by strager · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust -
Re: the SLOC count: the code is here https://github.com/quick-lint/cpp-vs-rust/tree/master/rust That... doesn't seem to be idiomatic Rust at all. unsafe and passing pointers everywhere? Reimplementing vectors and linked lists. Also, makes…
comment by sph · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust -
…split function signatures across multiple lines, but overall, I think rustfmt did a good job. C++: https://github.com/quick-lint/cpp-vs-rust/blob/f8d31341f5cac... lexer::parsed_identifier lexer::parse_identifier(const char8* input,…
comment by strager · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust -
…due to language features. Can you show an example in the Rust code where this might be possible? https://github.com/quick-lint/cpp-vs-rust/tree/master/rust
comment by strager · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust