polymorphic_value icon indicating copy to clipboard operation
polymorphic_value copied to clipboard

Add a small buffer optimisation

Open jbcoe opened this issue 7 years ago • 2 comments

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.

jbcoe avatar Jan 29 '17 10:01 jbcoe

Hi Jonathan,

I am no expert in SBO, but I would like to help. Are you still looking for collaborators?

NikBomb avatar Mar 11 '21 11:03 NikBomb

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.

jbcoe avatar Jul 06 '22 10:07 jbcoe

I believe that SBO can be done purely with allocators.

Closing this issue.

jbcoe avatar Aug 28 '22 16:08 jbcoe