From b280dedd1cee9739e1f50397af7371fdecc0c3a3 Mon Sep 17 00:00:00 2001 From: Zhigao Tong Date: Thu, 22 Sep 2022 15:19:33 +0800 Subject: [PATCH 1/2] fix performance issue --- libs/libmemcpy/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/libmemcpy/CMakeLists.txt b/libs/libmemcpy/CMakeLists.txt index a329d64bb49..e13f5e9a07a 100644 --- a/libs/libmemcpy/CMakeLists.txt +++ b/libs/libmemcpy/CMakeLists.txt @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -option(TIFLASH_FOLLY_MEMCPY_IS_MEMCPY "use folly memcpy as default `memcpy` and `memmove`" ON) +# TODO: optimize for small size memory +option(USE_FOLLY_MEMCPY_IS_MEMCPY "use folly memcpy as default `memcpy` and `memmove`" OFF) set (memcpy_sources) @@ -24,11 +25,11 @@ if (ARCH_LINUX AND TIFLASH_ENABLE_AVX_SUPPORT) list (APPEND memcpy_sources folly/memcpy.S) message (STATUS "`libmemcpy` support Folly memcpy") else () - set (TIFLASH_FOLLY_MEMCPY_IS_MEMCPY OFF) + set (USE_FOLLY_MEMCPY_IS_MEMCPY OFF) endif () if (USE_INTERNAL_MEMCPY) - if (TIFLASH_FOLLY_MEMCPY_IS_MEMCPY) + if (USE_FOLLY_MEMCPY_IS_MEMCPY) message (STATUS "Using Folly memcpy as default `memcpy` and `memmove`") add_definitions(-DFOLLY_MEMCPY_IS_MEMCPY=1) else () From 681b44152d61f6428282b87ad11b14f03185029c Mon Sep 17 00:00:00 2001 From: Zhigao Tong Date: Thu, 22 Sep 2022 15:34:11 +0800 Subject: [PATCH 2/2] fix typo --- libs/libmemcpy/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/libmemcpy/CMakeLists.txt b/libs/libmemcpy/CMakeLists.txt index e13f5e9a07a..ae0f9dc5776 100644 --- a/libs/libmemcpy/CMakeLists.txt +++ b/libs/libmemcpy/CMakeLists.txt @@ -13,7 +13,7 @@ # limitations under the License. # TODO: optimize for small size memory -option(USE_FOLLY_MEMCPY_IS_MEMCPY "use folly memcpy as default `memcpy` and `memmove`" OFF) +option(USE_FOLLY_MEMCPY_AS_MEMCPY "use folly memcpy as default `memcpy` and `memmove`" OFF) set (memcpy_sources) @@ -25,11 +25,11 @@ if (ARCH_LINUX AND TIFLASH_ENABLE_AVX_SUPPORT) list (APPEND memcpy_sources folly/memcpy.S) message (STATUS "`libmemcpy` support Folly memcpy") else () - set (USE_FOLLY_MEMCPY_IS_MEMCPY OFF) + set (USE_FOLLY_MEMCPY_AS_MEMCPY OFF) endif () if (USE_INTERNAL_MEMCPY) - if (USE_FOLLY_MEMCPY_IS_MEMCPY) + if (USE_FOLLY_MEMCPY_AS_MEMCPY) message (STATUS "Using Folly memcpy as default `memcpy` and `memmove`") add_definitions(-DFOLLY_MEMCPY_IS_MEMCPY=1) else ()