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

Rust's performance is competitive with clang and improving, even in the "safer" mode. We have benchmarks in many of the libraries (search for #[bench]) and some in src/test/bench. We're on the benchmarking game, but that is really just a game, not indicative of anything besides how much time someone has spent microoptimizing a specific program. Someone is working on a custom LLVM pass that will remove essentially every null check that Rust adds. On top of that, there are still a few more changes on the way that aren't easy, but should give a nice perf improvement.



Here is a link to the source code of the initial version of the custom LLVM pass to eliminate null checks. Hopefully this will be upstreamed to LLVM in the future.

https://github.com/rust-lang/llvm/blob/rust-llvm-2014-06-28/...


There's a small typo in there: argumetns -> arguments


> but that is really just a game,

Very much so, agreed. It is a PR game most of all. It is unfortunate. But it is probably a game that needs to be played. I know microbenchmarks are bogus, but I still click and look at them.


>But it is probably a game that needs to be played.

Not really. The language is supposed to catter to professional programmers, not script kiddies.


The games are really awful. Look at NBody for example: http://benchmarksgame.alioth.debian.org/u64/performance.php?.... The fastest C program does it in 10 seconds. Rust is at 21. What's the difference? The C program uses vector intrinsics, while the Rust program is a straightforward implementation. The next four fastest C programs, which don't use vector intrinsics, are only a hair faster than the Rust program (20.x seconds).

The script kiddie's takeaway is: "well, C is still twice as fast as Rust!" The real professional's takeaway is: "wow, Rust manages to get within 4% of C while using iterators and higher order functions in the inner loop! Also: "Rust can do inline assembly too if that's what I need." https://gist.github.com/luqmana/5150557


Hate to break it to you, but most professional programmers have no deep knowledge of:

* runtime systems * detailed memory management * algorithmic complexity

Yet, quite a lot of those build parts of huge systems that work and meet business requirements all the time, which makes them very desirable professionals.

Being able to competently benchmark is a fringe skill.


Sure -- but I'd call them "employed programmers" (as opposed to "professional").

In any case, I don't think Rust's target group doesn't know about runtime systems, detailed memory management and algorithmic complexity.

After all it's mostly if you care about all three that you'll consider Rust.


"professionals" are, by definition, people that are employed in a profession.


Sorry, downvoted you by mistake. Wanted to upvote, because yes, that's the definition of "professional", contrary to an "amateur" which is somebody engaged in a certain activity without monetary compensation (for the love of it only).


Sorry, but "by definition" there are several meanings in the dictionary. Merely employed is the lower level. And I think I made the way I mean it clear.

E.g From dictionary.reference.com:

noun: - a person who is expert at his or her work: You can tell by her comments that this editor is a real professional. - a person who engages in an activity with great competence

adj: - extremely competent in a job, etc - (of a piece of work or anything performed) produced with competence or skill


Yes, and I think I also made clear that I don't accept you using solely that definition to discredit and downplay achievements of people not concentrated on a fringe of things. Your comment is the elitist as hell.

For example, someone writing a huge distributed video processing system rarely needs to consider any of these topics. Because everything needed in that range is built. Making sure that the data is at the right place at the right time and predicting that needs none of the skill given by you. Is that person not a professional?


>Your comment is the elitist as hell.

Sorry?

Expecting professional programmers to be familiar with "runtime systems, detailed memory management and algorithmic complexity" is "elitist as hell"?

That's one of the reasons the industry is lead by charlatans pushing the latest fad, doesn't know it's own history, and has built pile upon pile of cruft.

>For example, someone writing a huge distributed video processing system rarely needs to consider any of these topics. Because everything needed in that range is built.

Blind reliance upon things build by others, the characteristics of which one building the "video processing system" you describe is not able to assess, and is not able to modify to suit the project's specific needs. That we accept that is a lowering of the profession. It's like doctors deciding it's no need to know pathology and anatomy anymore, because there are expert systems they can use.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: