godlikepanos / anki-3d-engine

AnKi 3D Engine - Vulkan backend, modern renderer, scripting, physics and more
http://www.anki3d.org
Other
1.31k stars 86 forks source link

Using std::move() if necessary #109

Closed GermanAizek closed 2 years ago

GermanAizek commented 2 years ago

@godlikepanos, hi, decide for yourself whether such optimizations are necessary or not. Feedback me.

godlikepanos commented 2 years ago

Thank you for looking into this. The change definitely makes sense. This annoying ref-counting all over the place is definitely something that I wanted to fix for quite some time. Did you used a specific method to identify where to place those std::moves?

GermanAizek commented 2 years ago

@godlikepanos, Thank you very much for your feedback, I like your engine and other different engines, so I also want to make a minor contribution to engine. There is a plugin for "any" IDE that allows you to identify very false and true metrics for minor optimization using clang-tidy from ClangPowerTools plugin. https://github.com/Caphyon/clang-power-tools You can't always trust the analysis, you still need to review code and actual usefulness of new changes (e.g. optimization).