3 ms·
> Rust is faster than ... Not if you use the wrong constructs, copy stuff around in the heap, use ref counting everywhere in longer running processes. I'm not
by dgb23 6y ago
> Rust is faster than ...
Not if you use the wrong constructs, copy stuff around in the heap, use ref counting everywhere in longer running processes.
I'm not nitpicking here, in Rust you can get really fast, but its on you to make that happen.
For example persistent data-structures (used in Clojure) are really fast and for some operations and cases even close to optimal.
Performance is hard, and I very much agree with your question here. What has been measured and what are the results.
- didibus 6y agoI agree with you, but I think the assumption here is that we're comparing two code bases that are both trying to be performant. The Rust defaults will probably start off more performant, and the ceiling will be higher as well. A lot of the performance comes from the different paradigms though, so it's not always an apple to apple comparison. But I also think that's an assumption being made when talking about a Clojure Vs Rust implementation. In the latter, you're most likely implying using mutable collections, fixed size structs, primitive types, and a tighter memory allocation surface. And not surprisingly, those are the same changes you'd make to your Clojure code base to speed it up (most likely).
- moocowtruck 6y agoeasier to fix the slower rust to make it faster than the fast closer? or easier to make the clojure faster than some decent rust code?