Forceinline improves performance significantly with MSVC #108
+69
−58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have proposed a pull request inspired by a strategy discussed in an issue from another repository boostorg/unordered#168. My aim is to enhance the performance of unordered_dense.h through strategic inlining. To this end, I've introduced the ANKERL_UNORDERED_DENSE_FORCEINLINE macro to various functions within the file.
I've attached benchmark results from MSVC for your review:
ankerl_unordered_dense.md
ankerl_unordered_dense_forceinline.md
While I believe these changes will benefit the performance based on the benchmarks, I understand that method selection and the use of forceinline might not align with all coding practices or performance considerations. If you find that my approach is not suitable, or if there are specific modifications you'd prefer, please feel free to close this PR. I'm open to any feedback or alternate suggestions.
Additionally, if it's more appropriate, I can open an issue to discuss the potential for these kinds of optimizations more broadly before proceeding with code changes. Your guidance on the best approach to contribute to this project is greatly appreciated.
Thank you for considering my contribution. I look forward to your feedback.