18/04/2023 22:09, Morten Brørup: > When getting objects from the mempool, the number of objects to get is > often constant at build time. > > This patch adds another code path for this case, so the compiler can > optimize more, e.g. unroll the copy loop when the entire request is > satisfied from the cache. > > On an Intel(R) Xeon(R) E5-2620 v4 CPU, and compiled with gcc 9.4.0, > mempool_perf_test with constant n shows an increase in rate_persec by an > average of 17 %, minimum 9.5 %, maximum 24 %. > > The code path where the number of objects to get is unknown at build time > remains essentially unchanged. > > Signed-off-by: Morten Brørup <m...@smartsharesystems.com> > Acked-by: Bruce Richardson <bruce.richard...@intel.com>
Applied with suggested added comment, thanks.