6 ms·
>which should eventually have all the speed and none of the UB insanity Judging by the benchmark game [1] https://benchmarksgame.alioth.debian.org/u64q/rust.ht
by valarauca1 11y ago
>which should eventually have all the speed and none of the UB insanity
Judging by the benchmark game [1] https://benchmarksgame.alioth.debian.org/u64q/rust.html https://benchmarksgame.alioth.debian.org/u64q/rust.html Rust has almost caught/eclipsed C. The biggest issue for the marks its behind on are stabilized SIMD support in Rust (nightly has it but its not finalized on an RFC level).
[1] Look I'll save you the comment. Yes the benchmark game isn't always indicative of real world performance. Its a bunch of small micro benchmarks that demonstrate basically how quickly Regexs/Hashing/Math are in each language. While that's not everything you do when programming its a decent chunk.
- bluejekyll 11y agoWhile I completely agree with migrating towards Rust, these games are a little misleading. I can't find the source, but when I was reading some of the authors comments in the past, it sounded like there was unsafe code used. Does anyone have a link to the source used in these tests?
- pcwalton 11y agoHere are a bunch of them: https://github.com/TeXitoi/benchmarksgame-rs/tree/master/src https://github.com/TeXitoi/benchmarksgame-rs/tree/master/src Here's a grep for unsafe: https://github.com/TeXitoi/benchmarksgame-rs/search?utf8=%E2%9C%93&q=unsafe https://github.com/TeXitoi/benchmarksgame-rs/search?utf8=%E2... 3/14 benchmarks use unsafe. pidigits just uses unsafe to bind to GMP. reverse-complement is weird and I'm not sure what's going on there at first glance. spectralnorm looks like it's just using it to divide up an array in parallel; in the past couple of months there have a been several Rust libraries to enable this from safe code, so that may be able to be removed now.
- igouy 11y agoHiding in plain sight. The program names on the website are links to the source code, the task names are links to measurements for the task, etc etc http://benchmarksgame.alioth.debian.org/u64q/measurements.php?lang=rust http://benchmarksgame.alioth.debian.org/u64q/measurements.ph...
- bluejekyll 11y agoWow. I feel like an idiot.
- igouy 11y agoAnd that is not what I want looking at the website to make you feel! However, underline for all link text makes a distracting mess. Hmm.
- igouy 11y agoYes, toy programs -- http://benchmarksgame.alioth.debian.org/why-measure-toy-benchmark-programs.html http://benchmarksgame.alioth.debian.org/why-measure-toy-benc... Yes, just a starting point -- http://benchmarksgame.alioth.debian.org/dont-jump-to-conclusions.html http://benchmarksgame.alioth.debian.org/dont-jump-to-conclus...