You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by xi...@apache.org on 2023/02/02 09:51:57 UTC

[incubator-kvrocks] branch unstable updated: Enable LuaJIT to improve the performance of scripts (#1241)

This is an automated email from the ASF dual-hosted git repository.

xiaobiao pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 676812d3 Enable LuaJIT to improve the performance of scripts (#1241)
676812d3 is described below

commit 676812d360697c8f1848e6df18e2ec2a793833aa
Author: xiaobiaozhao <52...@users.noreply.github.com>
AuthorDate: Thu Feb 2 17:51:49 2023 +0800

    Enable LuaJIT to improve the performance of scripts (#1241)
    
    * feat: def use luajit
    
    * ci: update ci
    
    * docs: update readme for luajit
    
    * ci: rename with_luajit to without_luajit
    
    * Update README.md
    
    Co-authored-by: Twice <tw...@apache.org>
    
    ---------
    
    Co-authored-by: hulk <hu...@gmail.com>
    Co-authored-by: Twice <tw...@apache.org>
---
 .github/workflows/kvrocks.yaml | 18 +++++++++---------
 CMakeLists.txt                 |  4 ++--
 README.md                      |  4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml
index e140dab9..030f4010 100644
--- a/.github/workflows/kvrocks.yaml
+++ b/.github/workflows/kvrocks.yaml
@@ -131,22 +131,22 @@ jobs:
             without_jemalloc: -DDISABLE_JEMALLOC=ON
             with_openssl: -DENABLE_OPENSSL=ON
             compiler: gcc
-          - name: Ubuntu GCC with luaJIT
+          - name: Ubuntu GCC without luaJIT
             os: ubuntu-20.04
             with_openssl: -DENABLE_OPENSSL=ON
-            with_luajit: -DUSE_LUAJIT=ON
+            without_luajit: -DUSE_LUAJIT=OFF
             compiler: gcc
-          - name: Ubuntu GCC ASan with luaJIT
+          - name: Ubuntu GCC ASan without luaJIT
             os: ubuntu-20.04
             without_jemalloc: -DDISABLE_JEMALLOC=ON
-            with_luajit: -DUSE_LUAJIT=ON
+            without_luajit: -DUSE_LUAJIT=OFF
             with_sanitizer: -DENABLE_ASAN=ON
             with_openssl: -DENABLE_OPENSSL=ON
             compiler: gcc
-          - name: Ubuntu GCC TSan with luaJIT
+          - name: Ubuntu GCC TSan without luaJIT
             os: ubuntu-20.04
             without_jemalloc: -DDISABLE_JEMALLOC=ON
-            with_luajit: -DUSE_LUAJIT=ON
+            without_luajit: -DUSE_LUAJIT=OFF
             with_sanitizer: -DENABLE_TSAN=ON
             with_openssl: -DENABLE_OPENSSL=ON
             compiler: gcc
@@ -194,9 +194,9 @@ jobs:
 
       - name: Build Kvrocks
         run: |
-          ./x.py build -j$NPROC --unittest --compiler ${{ matrix.compiler }} ${{ matrix.without_jemalloc }} ${{ matrix.with_luajit }} \
+          ./x.py build -j$NPROC --unittest --compiler ${{ matrix.compiler }} ${{ matrix.without_jemalloc }} ${{ matrix.without_luajit }} \
             ${{ matrix.with_ninja }} ${{ matrix.with_sanitizer }} ${{ matrix.with_openssl }} ${{ env.CMAKE_EXTRA_DEFS }}
-      
+
       - name: Setup Coredump
         if: ${{ startsWith(matrix.os, 'ubuntu') }}
         run: |
@@ -225,7 +225,7 @@ jobs:
             GOCASE_RUN_ARGS="-tlsEnable"
           fi
           ./x.py test go build $GOCASE_RUN_ARGS
-          
+
       - name: Find reports and crashes
         if: always()
         run: |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1656161..98af024f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ option(ENABLE_ASAN "enable address santinizer" OFF)
 option(ENABLE_TSAN "enable thread santinizer" OFF)
 option(ASAN_WITH_LSAN "enable leak santinizer while address santinizer is enabled" ON)
 option(ENABLE_STATIC_LIBSTDCXX "link kvrocks with static library of libstd++ instead of shared library" ON)
-option(USE_LUAJIT "use luaJIT instead of lua" OFF)
+option(USE_LUAJIT "use luaJIT instead of lua" ON)
 option(ENABLE_OPENSSL "enable openssl to support tls connection" OFF)
 option(ENABLE_IPO "enable interprocedural optimization" ON)
 option(ENABLE_UNWIND "enable libunwind in glog" ON)
@@ -48,7 +48,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
         message(FATAL_ERROR "It is expected to build kvrocks with Xcode toolchains 10 or above")
     endif()
 else()
-    message(WARNING "The compiler you are currently using is not officially supported, 
+    message(WARNING "The compiler you are currently using is not officially supported,
         so you can try switching to GCC>=7 or Clang>=5 if you encounter problems")
 endif()
 
diff --git a/README.md b/README.md
index 0e62f316..ca50a420 100644
--- a/README.md
+++ b/README.md
@@ -83,10 +83,10 @@ To build with TLS support, you'll need OpenSSL development libraries (e.g. libss
 $ ./x.py build -DENABLE_OPENSSL=ON
 ```
 
-To build with luaJIT instead of lua for better performance, run:
+To build with lua instead of luaJIT, run:
 
 ```shell
-$ ./x.py build -DUSE_LUAJIT=ON
+$ ./x.py build -DUSE_LUAJIT=OFF
 ```
 
 ### Running Kvrocks