polymorphic_value
polymorphic_value copied to clipboard
Add a small buffer optimisation
A buffer of known size can be used to store small objects and avoid use of indirect storage.
See https://akrzemi1.wordpress.com/2014/04/14/common-optimizations/
This could be applied to polymorphic_value
.
Speed impact should be measured as it will have some effect on non SBO cases.
Hi Jonathan,
I am no expert in SBO, but I would like to help. Are you still looking for collaborators?
Hi @NikBomb I'm behind on tracking my issues.
An opt-in SBO would be really cool. We might want it controlled by some preprocessor definitions so that we can control how big the buffer is (zero being no buffer). Profiling information might then let us fine-tune the buffer size.
I want to keep the presence of buffer as Quality of Implementation decision but would be keen to see how it affects real-world performance.
I believe that SBO can be done purely with allocators.
Closing this issue.