Files
o3de/Code/Framework/AzCore/Tests
AMZN-koppersr 389f29f0e7 Performance improvement for fixed_vector
AZStd::fixed_vector had all its functions marked with constexpr, but this requires all member variables to be fully initialized. This meant that the internal array used to store elements always has to be fully initialized. This was done for trivial classes but not for non-trivial classes. As a result trivial classes always did a memset (or more optimized versions for smaller buffers) while the non-trivial version couldn't actually be stored in a constexpr variable. Since AZStd::fixed_vector is meant to be dynamic the choice was made to remove the constexpr from all non-static member functions in favor of avoiding the overhead of memset, which profiling showed was a considerable overhead depending on the reserved size. If a truly constexpr array is needed than AZStd::array is a better choice as that's designed to not by dynamic.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
2021-11-23 09:26:37 -08:00
..
2021-08-16 16:02:53 -07:00
2021-10-05 15:12:53 -05:00
2021-08-20 14:48:42 -07:00
2021-08-20 14:48:42 -07:00
2021-09-03 14:50:26 -07:00
2021-08-20 20:36:11 -07:00
2021-09-08 16:50:57 -07:00
2021-08-20 14:48:42 -07:00