Inline StrSearcher::haystack()#42714
Conversation
|
r? @BurntSushi |
|
@bors r+ |
|
📌 Commit ca52d80 has been approved by |
|
@bors r- (see: #42716 (comment)) |
|
@alexcrichton I discovered this by accident when inspecting assembly of one of my programs in release mode. I was surprised to find lots of calls to that function here and there when it's just a getter to the field. I thought this method is an easy catch for the optimizer to inline (provided the attribute is there), basically 2 instructions to make a call to the function and 6 instructions in the function itself become 2 |
|
Oh don't worry, I understand how All I personally want is an anecdote or benchmarking showing the necessity of such tags. We have not always been so principled in the past, but it's very easy to go overboard with Sounds like you hit this when benchmarking, though, so sounds good to me, thanks! @bors: r+ |
|
📌 Commit ca52d80 has been approved by |
|
@bors rollup |
Inline StrSearcher::haystack()
Inline StrSearcher::haystack()
No description provided.