News for hackers. Stuff that matters.
Re:Rust is not fast by richardwhiuk on Tuesday November 19, 2013 @10:50AM (#6761931)
> The GC in Rust does need work. But so does C++'s GC and nobody is saying "C++ is not fast" because of it.

C++ doesn't have a garbage collector, so I'm not sure what you are getting at here.

Re:Rust is not fast by kibwen on Tuesday November 19, 2013 @10:55AM (#6761980)
Sure it does, here's one:

http://www.hpl.hp.com/personal/Hans_Boehm/gc/

Rust has a GC in the same sense that C++ has one, which is to say that its GC can be provided by libraries rather than being baked-in to the language.

Re:Rust is not fast by cwzwarich on Tuesday November 19, 2013 @12:08PM (#6762552)
Rust has GC that is part of the standard runtime / library with special language syntax to go with it. C++ has no such thing.
Re:Rust is not fast by kibwen on Tuesday November 19, 2013 @12:21PM (#6762663)
I'm about to blow your mind here: Rust has never had a GC. Managed pointers were always backed by reference counting, and the cycle collector stopped working sometime in 2010 and was never brought back online. Note that I said "were backed by reference counting" (emphasis mine), because managed pointers no longer exist in the language (unless you turn on the backwards-compatibility flag for them, which is only being provided temporarily).

So there's no longer even special syntax for a theoretical GC. Instead the plan is to greatly expand our support for custom pointer types in general, which will make all user-provided pointer types (implemented in whatever libraries our users come up with) first-class citizens. Our own stdlib will include several pointer types of this nature, including: `Rc` (reference counting), `Arc` (atomic (thread-safe) reference counting), `RWArc` (memory-safe Arc for mutable objects), and, yes, a `Gc` type.

And while it's true that we may provide hooks into the runtime to allow the `Gc` type to be implemented more efficiently, any user library will be able to use these hooks to implement its own GC. There won't be any implementation in the language itself.

Re:Rust is not fast by axelf on Tuesday November 19, 2013 @12:17PM (#6762620)
The special language syntax is being removed. Its now just a library.
Re:Rust is not fast by tomp on Tuesday November 19, 2013 @11:42AM (#6762350)
C++ has ways of dealing with memory and garbage (i.e. memory no longer in use), such as `malloc()` and `free()`, or reference counting, or destructors, and not all of these are as fast as you want them to be in every situation (e.g. see the numerous malloc implementations), so in performance-critical applications/operations, you have to be very mindful of memory use and optimize correctly (e.g. by using memory pools).
Re:Rust is not fast by widdershins on Tuesday November 19, 2013 @11:50AM (#6762412)
He may be referring to shared_ptr, which implements reference-counted garbage collection in the standard library.
Re:Rust is not fast by pcwalton on Tuesday November 19, 2013 @12:20PM (#6762651)
Both, really. Neither shared_ptr nor Boehm are perfect, but that hasn't stopped C++ from being fast in practice.
Re:Rust is not fast by cscottnet on Tuesday November 19, 2013 @11:59PM (#6766388)
Boehm is far from "fast in practice".