-
Notifications
You must be signed in to change notification settings - Fork 1.5k
avoid returning SmallVector since it has sizable overhead
#4526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This seems to make the function a lot more complicated. How much actual time improvement in terms of seconds do we get for this? We should just be using NRVO to avoid moving/copying the vector on return. |
It was already made more complicated by the fact that the braced initializer was not usable with
This depends on how complex the code is. In case of the callgrind selfcheck it reduces Ir from
The problem is with |
|
On a side note. I would love to do more cycle- and time-based profiling as well. But I cannot use Time-based would be great since I have the feeling we are losing time in our thread/process spawning/waiting code. I would like to apply the simplification from LCppC but there's still too many tests lacking for |
Interestingly using the But these are things I try to look into (it's a big list of things which grows all the time) and report it upstream. Unfortunately the quality of my reports is often lacking (as is my knowledge) and it's also not that straight forward to reproduce these issues in isolated/reduced cases. There's also a lack of discussion on several of these tickets since even though LLVM (which is the project I mainly report these issues for at the moment) is a big project there's not even a handful of people involved in that particular area which are also (obviously) pressed for time. So there's a certain lack of discussion/feedback on these as well. |
SmallVector since it has sizable overheadSmallVector since it has sizable overhead
d7d2d18 to
0ae6e39
Compare
0ae6e39 to
2c824e5
Compare
2c824e5 to
6ef5ed2
Compare
|
This has been superseded by #5442. |
Scanning
mame_regtestwith--enable=all --inconclusiveandDISABLE_VALUEFLOW=1:Clang 14
2,082,292,106->2,073,152,473Clang 14
1,829,061,568->1,766,615,436(with Boost 1.74)