Live data from Hacker News

Clang Format Tanks Performance

travisdowns.github.io

151–156 of 156 posts

Re: Clang Format Tanks Performance

#151
post #102

Earlier quoted context omitted.

Using Firefox to evaluate Rust performance is probably not a good idea since only parts of it are written in Rust today. But it's the first time I hear someone say that Rust is supposedly fundamentally slower than C++. I don't believe this to be a statement that can be substantiated, seeing that some of the fastest programs out there (ripgrep and hyper to name just two) are written in Rust.

Facts: On average rust is 10% slower on the banchmarkgame: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... But they use llvm instead of gcc for c++, and gcc is in average 20% faster than clang. Therefore, rust is 30% slower, at least on heavily optimised programs. And hyper is not the fastest http server, but the actix one is one of the fastest yes.

> Facts: On average rust is 10% slower on the banchmarkgame

That does not show it's 10% slower on average; it shows that C++ is 0.9917938291x as fast as Rust. They both have some where they win by 30%, most are closer, Rust is just faster on average.

> But they use llvm instead of gcc for c++,

C++ g++ g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008

?

> gcc is in average 20% faster than clang.

Extremely citation needed.

Re: Clang Format Tanks Performance

#152
post #102

Earlier quoted context omitted.

Using Firefox to evaluate Rust performance is probably not a good idea since only parts of it are written in Rust today. But it's the first time I hear someone say that Rust is supposedly fundamentally slower than C++. I don't believe this to be a statement that can be substantiated, seeing that some of the fastest programs out there (ripgrep and hyper to name just two) are written in Rust.

Facts: On average rust is 10% slower on the banchmarkgame: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... But they use llvm instead of gcc for c++, and gcc is in average 20% faster than clang. Therefore, rust is 30% slower, at least on heavily optimised programs. And hyper is not the fastest http server, but the actix one is one of the fastest yes.

> On average rust is 10% slower on the banchmarkgame

If that claim was true …

> gcc is in average 20% faster than clang

and if that claim was true …

then we might guess the rust programs average could be 10% faster than the C++ programs average, if both used the same compiler backend

— because those rust programs were compiled with llvm but those c++ programs were compiled with gcc.

Re: Clang Format Tanks Performance

#153

Earlier quoted context omitted.

Facts: On average rust is 10% slower on the banchmarkgame: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... But they use llvm instead of gcc for c++, and gcc is in average 20% faster than clang. Therefore, rust is 30% slower, at least on heavily optimised programs. And hyper is not the fastest http server, but the actix one is one of the fastest yes.

> Facts: On average rust is 10% slower on the banchmarkgame That does not show it's 10% slower on average; it shows that C++ is 0.9917938291x as fast as Rust. They both have some where they win by 30%, most are closer, Rust is just faster on average. > But they use llvm instead of gcc for c++, C++ g++ g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 ? > gcc is in average 20% faster than clang. Extremely citation needed.

> faster on average

What kind-of time measurements? What kind-of average?

This chart shows some time measurements:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

:and the geometric mean is faster for the C++ programs, but the median seems faster for the rust programs.

Statistical artifacts?

Re: Clang Format Tanks Performance

#154
post #153

Earlier quoted context omitted.

> Facts: On average rust is 10% slower on the banchmarkgame That does not show it's 10% slower on average; it shows that C++ is 0.9917938291x as fast as Rust. They both have some where they win by 30%, most are closer, Rust is just faster on average. > But they use llvm instead of gcc for c++, C++ g++ g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 ? > gcc is in average 20% faster than clang. Extremely citation needed.

> faster on average What kind-of time measurements? What kind-of average? This chart shows some time measurements: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... :and the geometric mean is faster for the C++ programs, but the median seems faster for the rust programs. Statistical artifacts?

> What kind-of time measurements? What kind-of average?

I interpreted the parent to mean a simple average, so I did exactly that: calculated the percentage for each, and averaged them. In the colloquial term, "mean".

Re: Clang Format Tanks Performance

#155
post #153

Earlier quoted context omitted.

> faster on average What kind-of time measurements? What kind-of average? This chart shows some time measurements: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... :and the geometric mean is faster for the C++ programs, but the median seems faster for the rust programs. Statistical artifacts?

> What kind-of time measurements? What kind-of average? I interpreted the parent to mean a simple average, so I did exactly that: calculated the percentage for each, and averaged them. In the colloquial term, "mean".

Geometric mean is the implicit default measurement for benchmarking

Re: Clang Format Tanks Performance

#156
post #153

Earlier quoted context omitted.

> faster on average What kind-of time measurements? What kind-of average? This chart shows some time measurements: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... :and the geometric mean is faster for the C++ programs, but the median seems faster for the rust programs. Statistical artifacts?

> What kind-of time measurements? What kind-of average? I interpreted the parent to mean a simple average, so I did exactly that: calculated the percentage for each, and averaged them. In the colloquial term, "mean".

typo ? "the colloquial term" is "average", the specific term is "mean".
Post reply on HN