4 ms·
Yes. That's why they don't like rust: http://www.viva64.com/en/b/0324/ http://www.viva64.com/en/b/0324/
by stebalien 10y ago
Yes. That's why they don't like rust: http://www.viva64.com/en/b/0324/ http://www.viva64.com/en/b/0324/
- jcranmer 10y agoThat ... is pretty jarring. Their arguments boil down to: a) No one wants to use a "minor" language, so it will never get traction b) It's slow (citation: the Benchmarks Game) c) Static and dynamic analysis can find anything anyways, so what's the point? First off, anyone who is seriously citing the Benchmarks Game as to making a definitive declaration of whether a language is slow or fast is intellectually dishonest. It's a game (as its name illustrates), so it reflects more the effort that people put in to try to optimize code rather than a comparison of "idiomatic" code. A case in point: the fastest program in C uses SSE intrinsics for its implementation. Given that they're selling a static analyzer, I would expect them to make the case for analysis. However, it's worth addressing the limitations. Almost no project has 100% test coverage, and even having test coverage isn't necessarily a cure for having no problems (IOC still found undefined overflows in SQLite, which is the only open source project I know of to have 100% line and branch coverage in their test suite). To my knowledge, there still exists no tools that can identify strict-aliasing violations or ODR violations. It's also worth minding Dijkstra's aphorism: testing cannot prove the absence of bugs, only their presence. Static analysis in C/C++ has to face the additional problem of the inability to write a precise pointer analysis--something that Rust's type-safety would fix.
- EvgeniyZh 10y ago> First off, anyone who is seriously citing the Benchmarks Game as to making a definitive declaration of whether a language is slow or fast is intellectually dishonest. But Rust is actually significantly slower than C++, that's for sure. You're welcome to test it by yourself.
- steveklabnik 10y ago> You're welcome to test it by yourself. If this is true, please file bugs. They're treated as such.
- igouy 10y agoA Rust k-nucleotide program based on std::collections::hash_map would be welcome. Edit (2017-02-09): Here are Rust k-nucleotide programs - http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&lang=rust&id=1 http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&lang=rust&id=2 http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&lang=rust&id=3 http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...
- steveklabnik 10y agoI don't know the history here, but https://github.com/TeXitoi/benchmarksgame-rs/blob/master/src/k_nucleotide.rs https://github.com/TeXitoi/benchmarksgame-rs/blob/master/src... https://github.com/TeXitoi/benchmarksgame-rs/issues/34 https://github.com/TeXitoi/benchmarksgame-rs/issues/34 (though some things have changed since these comments...)
- igouy 10y agok_nucleotide.rs implements it's own hash table, and that is no longer accepted: k-nucleotide programs that do that have been removed. Hence -- k-nucleotide source secs KB gz cpu cpu load No program contribute your program http://benchmarksgame.alioth.debian.org/u64q/rust.html http://benchmarksgame.alioth.debian.org/u64q/rust.html
- steveklabnik 10y agoWhat about languages that do not include their own hash tables? C is allowed to, but Rust is not?
- igouy 10y agoNo, the C programs are not allowed to implement their own hash table -- and as a consequence no C k-nucleotide program was shown for a couple of months. http://benchmarksgame.alioth.debian.org/u64q/knucleotide-description.html#knucleotide http://benchmarksgame.alioth.debian.org/u64q/knucleotide-des... Rust std::collections provides hash table implementations, it's just a matter of using them.
- igouy 10y ago> It's a game (as its name illustrates) < As a matter of intellectual honesty -- 'The name "benchmarks game" signifies nothing more than the fact that programmers contribute programs that compete (but try to remain comparable) for fun not money.' http://benchmarksgame.alioth.debian.org/sometimes-people-just-make-up-stuff.html#name-game http://benchmarksgame.alioth.debian.org/sometimes-people-jus...
- steveklabnik 10y agoSee also this thread https://news.ycombinator.com/item?id=12262251 https://news.ycombinator.com/item?id=12262251