Live data from Hacker News

2017 Rust Roadmap

github.com

151–160 of 201 posts

Re: 2017 Rust Roadmap

#151

Earlier quoted context omitted.

Source? First Google result for "Rust vs Go speed": https://benchmarksgame.alioth.debian.org/u64q/compare.php?la... Rust seems to perform significantly better on some workloads while Go outperforms it marginally in other ones (except reverse-complement where Go is almost 50% faster than Rust). Edit: As for the other points you make – they are often subjective and I've read the opposite to your statement at least as o…

The ones where Go outperforms us currently are the ones with heavy SIMD use; explicit SIMD is still unstable in Rust, so you're at the whims of LLVM generating it. We'll get there...

Do those Go programs use explicit SIMD ?

http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

Re: 2017 Rust Roadmap

#152

Earlier quoted context omitted.

This has been my experience also. I've written at least 40kloc of rust over the past couple years (including complex graphs with cycles, low-level DSP) and I could probably count the number of unsafe blocks I've needed on one hand. edit: This is not counting FFI though.

How do you handle cycles? I've seen discussions on places like /r/rust where people didn't seem to have any pleasant answers.

I tend to use petgraph[1] when I need a graph-like data structure (the only time I've needed cycles). Super fast, distinguishes `Node`s from `Edge`s, lots of useful items for different kinds of traversal.

[1]: https://github.com/bluss/petgraph

Re: 2017 Rust Roadmap

#153
post #151

Earlier quoted context omitted.

The ones where Go outperforms us currently are the ones with heavy SIMD use; explicit SIMD is still unstable in Rust, so you're at the whims of LLVM generating it. We'll get there...

Do those Go programs use explicit SIMD ? http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

I assume that they're better about generating it implicitly. That is, it's about why Rust is slow, not about why Go is fast.

Re: 2017 Rust Roadmap

#154
post #151

Earlier quoted context omitted.

Do those Go programs use explicit SIMD ? http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

I assume that they're better about generating it implicitly. That is, it's about why Rust is slow, not about why Go is fast.

I don't think Go emits SIMD at all. Their assembler doesn't even support parsing it.

I think these are probably just bugs that we need to look at. The benchmarks where we do worse are the string benchmarks; perhaps it's our Unicode correctness that is hurting us, or something like that.

Re: 2017 Rust Roadmap

#155

Earlier quoted context omitted.

It's important to note that Go and C have very different design goals from Rust. Go was never designed to have zero-cost abstractions (garbage collection being the most obvious outcome of this, but there are many others), and it has a runtime. C was never designed for safety and security, memory safety or otherwise. In short, Go sacrifices performance and C sacrifices safety, while Rust's goal is to sacrifice neither…

Go outperforms rust on all kinds of benchmarks, has a larger community, better documentation, more third party libraries, and significantly better tooling. What's the value proposition for using rust over go?

> What's the value proposition for using rust over go?

Productivity features like generics, a more mature optimization pipeline, freestanding (runtime-less use), highly optimized libraries like serialization frameworks and regular expressions, etc. etc.

Re: 2017 Rust Roadmap

#156

It's important to note that this is an RFC which has been proposed, and there's likely to be a good deal of discussion and revision before it's merged/adopted as the official 2017 roadmap. The conversation can be followed/joined/whatever here: https://github.com/rust-lang/rfcs/pull/1774

"accordance with RFC 1728" - could they have chosen a naming scheme so their documents are not confused with the _real_ RFC's? Even RRFC 1728 would helpful. Or maybe just #1728?

Re: 2017 Rust Roadmap

#157

Earlier quoted context omitted.

Honestly, the more you program in rust, the more you get used to its mannerisms. I don't at this point find that I'm less productive in it than in Go, and with gennerics I'm generally able to reuse code more often meaning that I usually write less code. Similarly in C I lose time on screwing up basic things that I have to debug in testing, whereas in Rust I don't have to even worry about that. I'm actually not buying…

Claiming that it is less productive when you barely know it isn't fair... I'm really quite familiar with both go and rust, and I can say straight out that go is more productive than rust. ...but because rust is in any way a worse or less productive language (that remains to be seen), but because it has an immature ecosystem with few high quality crates and virtually no tooling. Go has a lot of very polished tooling (…

> Go has a lot of very polished tooling (eg. gocode) that is supported in multiple editors

Have you tried racer? It seems quite similar, and apparently it does more (see [1]).

I mean, I agree in the abstract that yes, having tooling and a bigger library ecosystem matters a lot. But the things you've cited so far (code completion and an AWS library) are things that Rust does have. I'd be more interested in hearing specific problems with those.

[1]: https://github.com/nsf/gocode/issues/307#issuecomment-155080...

Re: 2017 Rust Roadmap

#158

Earlier quoted context omitted.

I assume that they're better about generating it implicitly. That is, it's about why Rust is slow, not about why Go is fast.

I don't think Go emits SIMD at all. Their assembler doesn't even support parsing it. I think these are probably just bugs that we need to look at. The benchmarks where we do worse are the string benchmarks; perhaps it's our Unicode correctness that is hurting us, or something like that.

It definitely does: https://github.com/golang/go/blob/b851ded09a300033849b60ab47...

I should look into those benchmarks if you think there might be string problems. To be frank, I've never looked too closely at anything except for regex-dna.

Re: 2017 Rust Roadmap

#159

Earlier quoted context omitted.

> Sometimes ref-counting (Rc in Rust) is fine, although that's more expensive than GC. To nitpick: The jury's still out on that one, because Rc in Rust isn't thread-safe reference counting. I believe that non-thread-safe reference counting is quite competitive with global, cross-thread tracing GC. When people (rightly) talk about how much slower reference counting is than tracing GC, they're almost always talking abo…

> When people (rightly) talk about how much slower reference counting is than tracing GC, they're almost always talking about either thread-safe tracing GC vs. thread-safe reference counting or single-threaded tracing GC vs. single-threaded reference counting. Reference counting has always been slower, even in single-threaded cases. This should be obvious because pure reference counting requires modifying counts when…

> This should be obvious because pure reference counting requires modifying counts whenever locals are assigned, which happen orders of magnitude more often than main memory updates, and now each local assignment requires touching main memory too.

I guess so, but it's worth noting that this isn't the case in Rust, because Rc benefits from move semantics. Most assignments don't touch the reference counts at all.

Re: 2017 Rust Roadmap

#160

Earlier quoted context omitted.

I don't think Go emits SIMD at all. Their assembler doesn't even support parsing it. I think these are probably just bugs that we need to look at. The benchmarks where we do worse are the string benchmarks; perhaps it's our Unicode correctness that is hurting us, or something like that.

It definitely does: https://github.com/golang/go/blob/b851ded09a300033849b60ab47... I should look into those benchmarks if you think there might be string problems. To be frank, I've never looked too closely at anything except for regex-dna.

Oh, interesting. I was inferring that from the Go code out there that uses machine code directly: https://github.com/minio/blake2b-simd/blob/master/compressAv...

I guess it must be a recent addition.

Post reply on HN