diff options
author | 罗泽轩 <spacewanderlzx@gmail.com> | 2021-05-01 01:38:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 10:38:16 -0700 |
commit | d3cd78a87c8ef23e05e970447bf3a6f5967683d6 (patch) | |
tree | ada7076c134121bf77d25ff62cc8a9f7f7a5ab36 /tests | |
parent | 8fa3dfdb5dfbc0d77af4355fe65d7b127e5c7545 (diff) | |
download | flatbuffers-d3cd78a87c8ef23e05e970447bf3a6f5967683d6.tar.gz flatbuffers-d3cd78a87c8ef23e05e970447bf3a6f5967683d6.tar.bz2 flatbuffers-d3cd78a87c8ef23e05e970447bf3a6f5967683d6.zip |
[Lua] Add LuaJIT support (#6584)
* [Lua] Add LuaJIT support
Here is the output of LuaTest.sh:
Run with LuaJIT:
built 100 512-byte flatbuffers in 0.16sec: 0.63/msec, 0.31MB/sec
built 1000 512-byte flatbuffers in 0.08sec: 12.06/msec, 5.89MB/sec
built 10000 512-byte flatbuffers in 0.80sec: 12.44/msec, 6.07MB/sec
built 10000 512-byte flatbuffers in 0.33sec: 30.58/msec, 14.93MB/sec
traversed 100 592-byte flatbuffers in 0.04sec: 2.51/msec, 1.42MB/sec
traversed 1000 592-byte flatbuffers in 0.03sec: 31.52/msec, 17.79MB/sec
traversed 10000 592-byte flatbuffers in 0.21sec: 48.77/msec, 27.53MB/sec
Run with Lua 5.3:
built 100 512-byte flatbuffers in 0.02sec: 5.44/msec, 2.66MB/sec
built 1000 512-byte flatbuffers in 0.17sec: 5.74/msec, 2.80MB/sec
built 10000 512-byte flatbuffers in 1.75sec: 5.72/msec, 2.79MB/sec
built 10000 512-byte flatbuffers in 1.38sec: 7.26/msec, 3.55MB/sec
traversed 100 592-byte flatbuffers in 0.00sec: 27.64/msec, 15.60MB/sec
traversed 1000 592-byte flatbuffers in 0.03sec: 30.46/msec, 17.20MB/sec
traversed 10000 592-byte flatbuffers in 0.34sec: 29.62/msec, 16.72MB/sec
* [Lua] Better usage description
* update according to the review
Diffstat (limited to 'tests')
-rw-r--r-- | tests/LuaTest.bat | 3 | ||||
-rwxr-xr-x | tests/LuaTest.sh | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/LuaTest.bat b/tests/LuaTest.bat index 2bbf1d0e..e4e3fd8d 100644 --- a/tests/LuaTest.bat +++ b/tests/LuaTest.bat @@ -3,4 +3,7 @@ if "%1"=="-b" set buildtype=%2 ..\%buildtype%\flatc.exe --lua -I include_test monster_test.fbs +echo Run with LuaJIT: +luajit.exe luatest.lua +echo Run with Lua 5.3: lua53.exe luatest.lua
\ No newline at end of file diff --git a/tests/LuaTest.sh b/tests/LuaTest.sh index eb70e8a1..fdf4fddb 100755 --- a/tests/LuaTest.sh +++ b/tests/LuaTest.sh @@ -19,4 +19,7 @@ test_dir="$(pwd)" ${test_dir}/../flatc --lua -I include_test monster_test.fbs +echo "Run with LuaJIT:" +luajit luatest.lua +echo "Run with Lua 5.3:" lua5.3 luatest.lua |