Questionmark operator performance regression


Seeing that ? operator landed on stable in 1.13 and that my project is still not being used anywhere so breaking compatibility with users on lower versions isn’t an issue, I went ahead and replaced all try! macros I had with ?. The result is a roughly 20% performance loss:

Nothing in the code has changed aside from the try! -> ? change. Are there any side effects of the ? operator that the try! macro does not have - something that would prevent inlining for example?


Profiling before and after would be useful to see if inlining decisions de facto changed. There are more functions involved, going through the Carrier trait, but it can all be inlined if the compiler wants to.


Does this happen with a debug or a release (optimized) build?


In any case please open an issue at - this should not get lost.


@terhix Did you report this bug? Couldn’t find any issue on github.



Thanks for doing this. I’m on holidays with sparse access to the internet, I’ll try to investigate further when possible.