Replies: 1 comment 3 replies
-
|
There's Though it's probably a better idea to use non-panicing code in the first place. But no idea how we could verify that as easily as |
Beta Was this translation helpful? Give feedback.
-
|
There's Though it's probably a better idea to use non-panicing code in the first place. But no idea how we could verify that as easily as |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/dtolnay/no-panic is an absolutely amazing hack, which allows to have static guarantees that the function can't possibly panic under any circumstances.
In particular, this might be helpful to not guess if bounds checks were elided by compiler and to handle other more tricky cases, which can and do result in performance improvements when fixed.
This is how I usually run it in my project:
It takes some time to process due to LTO and deep inlining, but eventually it succeeds.
Now I have tried it on crate that uses
cargo-gputo build itself, forwarded the feature, but even this empty function:Results in:
Any ideas what is going on here? Dead code elimination is not working at all?
Beta Was this translation helpful? Give feedback.
All reactions