On Wed, Aug 30, 2017 at 03:56:35PM +0100, Ananyev, Konstantin wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Xiaoyun Li > > Sent: Friday, August 25, 2017 3:06 AM > > To: Richardson, Bruce <bruce.richard...@intel.com> > > Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo...@intel.com>; Wang, Zhihong > > <zhihong.w...@intel.com>; Zhang, Qi Z > > <qi.z.zh...@intel.com>; Li, Xiaoyun <xiaoyun...@intel.com> > > Subject: [dpdk-dev] [PATCH 1/3] eal/x86: run-time dispatch over memcpy > > > > This patch dynamically selects functions of memcpy at run-time based > > on CPU flags that current machine supports. This patch uses function > > pointers which are bind to the relative functions at constrctor time. > > To make AVX512 instructions pass compilation, enable the switch in > > makefile. > > It seems quite an overhead to add extra function call for each 16B movement... > Wouldn't it be better to have one func_ptr per implementation, i.e: > rte_memcpy_sse(), rte_memcpy_avx2(), rte_memcpy_avx512(), etc.? > Konstantin > +1 to this.
Also, how big of a benefit is there for this implementation over standard libc memcpy (in a reasonably bleeding edge distro like e.g. Fedora 26)? /Bruce