Timeline for Using output arguments in C++ to avoid dynamic allocations
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 3, 2020 at 23:41 | comment | added | Deduplicator | @cube I suggest at least encoding something breaking the SBO threshold. Below that, re-using could not possibly help. | |
| Nov 3, 2020 at 15:07 | comment | added | cube | btw I've tried this in the godbolt compiler explorer and I can't really tell which one is better :) godbolt.org/z/dc8f4d | |
| Nov 3, 2020 at 11:07 | comment | added | Deduplicator | It may, but is only likely to if it inlines the call. And the as-if-rule alone won't do it, there are special rules for allocation involved. Will it? That would need to be tested, after measuring that it really matters. As you re-iterated, efficiency is not an issue anyway. | |
| Nov 3, 2020 at 10:19 | history | answered | Caleth | CC BY-SA 4.0 |