22
you are viewing a single comment's thread
view the rest of the comments
[-] robinm@programming.dev 7 points 1 year ago

As far as I know, adding the support for restrict didn’t trigger any bugs in GCC

That's very impressive for gcc. IIRC adding restrict to LLVM triiggered major bugs and miscompilations at least for the first two attempts. As they said they need to do a crater run to be sure, but even passing the initial smoke test is an achievement for gcc.

However, I'm surprised the code is “only” 3% faster using restric annotation. IIRC the speed-ups were about 5% for LLVM so maybe there is still some performance to gain on the gcc side?

[-] antoyo@lemmy.world 7 points 1 year ago

To be fair, I heard that some bugs for restrict fixed in LLVM were also fixed in GCC as a result of finding them using the LLVM codegen of rustc.

For the 3%, this is in only one particular benchmark. Since I was curious, I compiled my test program with the LLVM codegen and disabled noalias: there's also a 3% performance improvement.

this post was submitted on 01 Sep 2023
22 points (100.0% liked)

Rust

5744 readers
78 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS