Hacker GitHub

← All repos

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

Mentions per year 8 mentions · busiest year 2023 (8)
20082026
  1. …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...
  2. cool! Does quick-lint use this pattern? https://github.com/quick-lint/cpp-vs-rust
  3. 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…
  4. …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
  5. …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…
  6. 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…
  7. …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,…
  8. …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