Hacker News new | comments | show | ask | jobs | submit login

> But at the end of the day, we do need a way to develop efficient mutable, concurrent data structures. Languages that rely on message passing, like Erlang, usually pass this problem down to a database, but the problem still has to be solved.

Rust fully supports concurrent data structures with shared mutable state, and there are several in the libraries.

> But GC already provides better throughput than manual memory allocation in practically all circumstances

This is far too broad of a statement. I can certainly come up with cases in which manual memory management will outperform GC. For example, if you have an arena-like pattern like the binary-trees benchmark, I think it's impossible to outperform manual memory management. Even if you bump allocate in the nursery then you still have to copy to the tenured generation, reducing throughput over a bump allocator.

> and suffers mostly from latency issues (pauses), but even those are being worked on with some good progress (like the work done by Azul on their JVM).

Azul C4 generally requires a kernel extension to perform well, reducing its applicability in practice (desktop/mobile software). It also suffers from somewhat reduced throughput over the HotSpot garbage collector, according to the paper. This is not to bash Azul C4, of course—it's a really exciting piece of technology—but I feel that it's often held up as a solution to all of the problems of garbage collection when it, too, has tradeoffs.

> It's possible that hardware has become too complicated for us not to give up some control over to some runtime. Maybe we're at a stage where low-level full-control programming is incompatible with fully utilizing the hardware for best performance.

I don't see this the case in practice quite yet. Java HotSpot, which features the best widely used GC, is routinely outperformed by low-level C++. At this point I see the burden of proving that garbage collection outperforms manual memory management in practice is on the proponents of pervasive concurrent GC. It may well happen, but I don't think we're there yet.




> Rust fully supports concurrent data structures with shared mutable state, and there are several in the libraries.

Are they lock-free? If so, how do you do it without a GC?

> Java HotSpot, which features the best widely used GC, is routinely outperformed by low-level C++

This is true mostly in single-threaded computations. Also, as another commenter points out, Java's main problem is the lack of arrays of structs which makes locality difficult. This is being worked on (and almost completely orthogonal to the issue of GC), and will hopefully be at least partially resolved in Java 9[1].

My point is that while we need new languages now, we also need to prepare them for a many-core future. Once you have over 100 cores, many locking schemes stop scaling[2]. I'm not saying Rust specifically should think ahead, but I think a new systems programming language should, especially if it's goal is to replace C for the next 40 years. Unless, that is, what I said turns out to be true, and low-level programming will give us good control over resources, but not the best performance; or if the many-core CPU future isn't coming (I say CPU because we're already in the many-core SIMD present with modern GPUs).

[1]: http://openjdk.java.net/jeps/169

[2]: http://www.infoq.com/news/2008/05/click_non_blocking




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: